From Dustin Johnson: AirPcap display update.
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 9 Jul 2007 16:36:29 +0000 (16:36 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 9 Jul 2007 16:36:29 +0000 (16:36 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22278 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/airpcap_gui_utils.c

index fc413fd1bb8414285e3860f9578b02f4be99d76e..27f7a931e37ce52ccc12e4de388e41eb3159dbe1 100644 (file)
@@ -87,7 +87,11 @@ airpcap_get_all_channels_list(airpcap_if_info_t* if_info)
                current_adapter = (airpcap_if_info_t*)current_item->data;
                if(current_adapter != if_info && g_strncasecmp("AirPcap USB wireless capture adapter nr.", current_adapter->description, 40) == 0)
                {
-                       tmp = g_strdup_printf("%d",current_adapter->channelInfo.Frequency);
+                       if (airpcap_get_channel_number_from_freq(current_adapter->channelInfo.Frequency) != 0){
+                               tmp = g_strdup_printf("%d",airpcap_get_channel_number_from_freq(current_adapter->channelInfo.Frequency));
+                       }else{
+                               tmp = g_strdup_printf("%d MHz",current_adapter->channelInfo.Frequency);
+                       }
                        g_strlcat(frequencies,tmp,128);
                        g_free(tmp);