Have the routines to get interface lists take a pointer to a "gchar *"
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 21 Jan 2007 23:45:36 +0000 (23:45 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 21 Jan 2007 23:45:36 +0000 (23:45 +0000)
commita77c32bbd28a4bf9ff3e49c7766d1327b86d41db
tree5512510787af52895ceb934713d75bf182fa3033
parentc02e067a72dd0f37f65a7da9fc8a632e8ed71bfa
Have the routines to get interface lists take a pointer to a "gchar *"
as an argument, and, on an error, if they have an error message, have
them set that "gchar *" to point to a g_malloc()ed string containing the
error message, rather than taking a pointer to a buffer for that message
as an argument.  That's more like what's done in Wiretap, and doesn't
impose an upper limit on the lengths of those error messages.  If that
pointer is null, don't allocate the message string and return it.

Have that error message already have the "cant_get" processing applied
to it, so nobody other than those routines need to call the "cant_get"
routines to process the error messages.

Have get_airpcap_interface_list() explicitly set "*err" to the
appropriate error code.

Clean up indentation.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20521 f5534014-38df-0310-8fa8-9805f1628bb7
13 files changed:
airpcap_loader.c
airpcap_loader.h
capture-pcap-util-int.h
capture-pcap-util-unix.c
capture-pcap-util.c
capture-pcap-util.h
capture-wpcap.c
capture_opts.c
capture_ui_utils.c
gtk/capture_dlg.c
gtk/capture_if_dlg.c
gtk/capture_prefs.c
gtk/main.c