mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2004-01-13 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/hbci-interaction.c, gnc-hbci-utils.c: Add workaround code for openhbci/chipcard problem. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9768 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
0af977933a
commit
371fe2043a
@ -1,3 +1,8 @@
|
|||||||
|
2004-01-13 Christian Stimming <stimming@tuhh.de>
|
||||||
|
|
||||||
|
* src/import-export/hbci/hbci-interaction.c, gnc-hbci-utils.c: Add
|
||||||
|
workaround code for openhbci/chipcard problem.
|
||||||
|
|
||||||
2004-01-12 Derek Atkins <derek@ihtfp.com>
|
2004-01-12 Derek Atkins <derek@ihtfp.com>
|
||||||
|
|
||||||
* src/app-utils/file-utils.[ch]: add gnc_getline() function
|
* src/app-utils/file-utils.[ch]: add gnc_getline() function
|
||||||
|
@ -425,6 +425,7 @@ gnc_hbci_api_execute (GtkWidget *parent, HBCI_API *api,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GNCInteractor_set_cache_valid (inter, TRUE);
|
||||||
if (resultcode <= 20) {
|
if (resultcode <= 20) {
|
||||||
HBCI_Error_delete (err);
|
HBCI_Error_delete (err);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -52,6 +52,7 @@ GNCInteractor *gnc_hbci_api_interactors (HBCI_API *api, GtkWidget *parent)
|
|||||||
data = g_new0 (GNCInteractor, 1);
|
data = g_new0 (GNCInteractor, 1);
|
||||||
data->parent = parent;
|
data->parent = parent;
|
||||||
data->keepAlive = TRUE;
|
data->keepAlive = TRUE;
|
||||||
|
data->cache_valid = FALSE;
|
||||||
data->cache_pin =
|
data->cache_pin =
|
||||||
gnc_lookup_boolean_option(PREF_TAB_ONLINE_BANKING,
|
gnc_lookup_boolean_option(PREF_TAB_ONLINE_BANKING,
|
||||||
"HBCI Remember PIN in memory",
|
"HBCI Remember PIN in memory",
|
||||||
@ -123,12 +124,19 @@ void GNCInteractor_delete(GNCInteractor *data)
|
|||||||
data->dialog = NULL;
|
data->dialog = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GNCInteractor_set_cache_valid(GNCInteractor *i, gboolean value)
|
||||||
|
{
|
||||||
|
g_assert(i);
|
||||||
|
i->cache_valid = value;
|
||||||
|
}
|
||||||
|
|
||||||
void GNCInteractor_erasePIN(GNCInteractor *i)
|
void GNCInteractor_erasePIN(GNCInteractor *i)
|
||||||
{
|
{
|
||||||
g_assert(i);
|
g_assert(i);
|
||||||
if (i->pw != NULL)
|
if (i->pw != NULL)
|
||||||
g_free (memset (i->pw, 0, strlen (i->pw)));
|
g_free (memset (i->pw, 0, strlen (i->pw)));
|
||||||
i->pw = NULL;
|
i->pw = NULL;
|
||||||
|
i->cache_valid = FALSE;
|
||||||
i->user = NULL;
|
i->user = NULL;
|
||||||
}
|
}
|
||||||
void GNCInteractor_reparent (GNCInteractor *i, GtkWidget *new_parent)
|
void GNCInteractor_reparent (GNCInteractor *i, GtkWidget *new_parent)
|
||||||
@ -207,7 +215,7 @@ static int msgInputPin(const HBCI_User *user,
|
|||||||
g_free (msgstr);
|
g_free (msgstr);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (user && (user == data->user)) {
|
if (data->cache_valid && user && (user == data->user)) {
|
||||||
/* Cached user matches, so use cached PIN. */
|
/* Cached user matches, so use cached PIN. */
|
||||||
/*printf("Got the cached PIN for user %s.\n", HBCI_User_userId (user));*/
|
/*printf("Got the cached PIN for user %s.\n", HBCI_User_userId (user));*/
|
||||||
*pinbuf = g_strdup (data->pw);
|
*pinbuf = g_strdup (data->pw);
|
||||||
|
@ -38,6 +38,7 @@ void GNCInteractor_hide(GNCInteractor *i);
|
|||||||
void GNCInteractor_delete(GNCInteractor *i);
|
void GNCInteractor_delete(GNCInteractor *i);
|
||||||
void GNCInteractor_erasePIN(GNCInteractor *i);
|
void GNCInteractor_erasePIN(GNCInteractor *i);
|
||||||
void GNCInteractor_reparent (GNCInteractor *i, GtkWidget *new_parent);
|
void GNCInteractor_reparent (GNCInteractor *i, GtkWidget *new_parent);
|
||||||
|
void GNCInteractor_set_cache_valid(GNCInteractor *i, gboolean value);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -77,6 +77,8 @@ struct _inter_data
|
|||||||
/* The cached PIN and the HBCI_User it's cached for. */
|
/* The cached PIN and the HBCI_User it's cached for. */
|
||||||
char *pw;
|
char *pw;
|
||||||
const HBCI_User *user;
|
const HBCI_User *user;
|
||||||
|
/* Whether this PIN is really valid or not. */
|
||||||
|
gboolean cache_valid;
|
||||||
};
|
};
|
||||||
|
|
||||||
void delete_GNCInteractor (GNCInteractor *data);
|
void delete_GNCInteractor (GNCInteractor *data);
|
||||||
|
Loading…
Reference in New Issue
Block a user