forked from osmocom/wireshark
From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8446 Wifi details are not stored in the Decryption Key Management dialog (post 1.8.x)
If there is not 80211_keys file, using Decryption Management Key don't create the file and keys is not saved. From me: Use a err2 variable to avoid to break API/ABI when backport to 1.8 svn path=/trunk/; revision=48900
This commit is contained in:
parent
0ef40a6145
commit
1093faf643
|
@ -249,7 +249,8 @@ set_wep_key(pref_t *pref, gpointer ud _U_)
|
|||
keys_cb_data_t* user_data;
|
||||
uat_t *uat;
|
||||
gint i;
|
||||
char* err = NULL;
|
||||
const char* err = NULL;
|
||||
char* err2 = NULL;
|
||||
uat_wep_key_record_t uat_key;
|
||||
|
||||
decryption_key_t* new_key;
|
||||
|
@ -260,10 +261,16 @@ set_wep_key(pref_t *pref, gpointer ud _U_)
|
|||
if (g_ascii_strcasecmp(pref->name, "wep_key_table") == 0 && pref->type == PREF_UAT)
|
||||
{
|
||||
uat = (uat_t *)pref->varp.uat;
|
||||
/* UAT must be loaded */
|
||||
if (!uat->loaded)
|
||||
return 1;
|
||||
{
|
||||
/* UAT will only be loaded if previous keys exist, so it may need
|
||||
to be loaded now */
|
||||
uat_load(uat, &err);
|
||||
if (err != NULL)
|
||||
return 1;
|
||||
|
||||
uat->loaded = 1;
|
||||
}
|
||||
/* Free the old records */
|
||||
uat_clear(uat);
|
||||
|
||||
|
@ -276,8 +283,8 @@ set_wep_key(pref_t *pref, gpointer ud _U_)
|
|||
uat_add_record(uat, &uat_key);
|
||||
}
|
||||
|
||||
uat_save(uat, &err);
|
||||
if (err != NULL)
|
||||
uat_save(uat, &err2);
|
||||
if (err2 != NULL)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue