keys_cb_data_t* user_data;
uat_t *uat;
gint i;
- char* err = NULL;
+ const char* err = NULL;
uat_wep_key_record_t uat_key;
decryption_key_t* new_key;
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);
uat_key.string = get_key_string(new_key);
uat_key.key = new_key->type;
- uat_add_record(uat, &uat_key);
+ uat_add_record(uat, &uat_key, TRUE);
}
uat_save(uat, &err);
if (numInfo == 0)
return NULL;
- pSupportedChannels = g_malloc(numInfo * (sizeof *pSupportedChannels));
+ pSupportedChannels = (Dot11Channel *)g_malloc(numInfo * (sizeof *pSupportedChannels));
for (i = 0; i < numInfo; i++)
{
ad = airpcap_if_open(name, ebuf);
if (ad)
{
- if_info = g_malloc0(sizeof (airpcap_if_info_t));
+ if_info = (airpcap_if_info_t *)g_malloc0(sizeof (airpcap_if_info_t));
if_info->name = g_strdup(name);
if (description == NULL){
if_info->description = NULL;
* Retrieve the first AirPcap adapter available. If no interface is found,
* it is not possible to retrieve the driver's settings, so return NULL.
*/
- if_info = g_list_nth_data(airpcap_if_list,0);
+ if_info = (airpcap_if_info_t *)g_list_nth_data(airpcap_if_list,0);
if (if_info == NULL)
return NULL;
ad = airpcap_if_open(if_info->name, ebuf);
if (ad)
{
- fake_if_info = g_malloc(sizeof (airpcap_if_info_t));
+ fake_if_info = (airpcap_if_info_t *)g_malloc(sizeof (airpcap_if_info_t));
fake_if_info->name = g_strdup(if_info->name);
fake_if_info->description = g_strdup(if_info->description);
fake_if_info->loopback = FALSE;
static void
free_airpcap_if_cb(gpointer data, gpointer user_data _U_)
{
- airpcap_if_info_t *if_info = data;
+ airpcap_if_info_t *if_info = (airpcap_if_info_t *)data;
if (NULL == if_info)
return;
info_if->keysCollectionSize = 0;
- info_if->DecryptionOn = FALSE;
+ info_if->DecryptionOn = AIRPCAP_DECRYPTION_OFF;
info_if->saved = FALSE;
}
}
ad = airpcap_if_open(curr_if->name, ebuf);
if (ad)
{
- curr_if->DecryptionOn = (gboolean)AIRPCAP_DECRYPTION_OFF;
+ curr_if->DecryptionOn = AIRPCAP_DECRYPTION_OFF;
airpcap_if_set_decryption_state(ad,curr_if->DecryptionOn);
/* Save configuration for the curr_if */
if (!airpcap_if_store_cur_config_as_adapter_default(ad))
vrev, build);
}
#endif /* HAVE_AIRPCAP */
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */