aboutsummaryrefslogtreecommitdiffstats
path: root/capture_ui_utils.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2007-08-22 18:56:20 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2007-08-22 18:56:20 +0000
commit8043464c24e4f80da76b870ca8af035d51010e2c (patch)
tree1db43eda4da23d1b01afe37bb2167a1b97c3ac6f /capture_ui_utils.c
parent2f77efce7da0a079c38609e7bd24cc69937863b1 (diff)
gcc 4 doesn't like my macro for getting the interface description: it says there's an invalid lvalue in it. I don't see what's wrong with it, but replace the macro with a function. Also: don't include the .xpm files in gtk/main.c if we're building without PCAP (as they're not used in that configuration).
svn path=/trunk/; revision=22588
Diffstat (limited to 'capture_ui_utils.c')
-rw-r--r--capture_ui_utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/capture_ui_utils.c b/capture_ui_utils.c
index 33a4b9c1fe..04d806b0bd 100644
--- a/capture_ui_utils.c
+++ b/capture_ui_utils.c
@@ -346,4 +346,17 @@ get_if_name(const char *if_text)
return if_name;
}
+/* Return capture_opts->iface_descr (after setting it if it is not set)
+ * This is necessary because capture_opts.c can't set iface_descr (at least
+ * not without adding significant dependencies there).
+ */
+const char *
+get_iface_description(capture_options *capture_opts)
+{
+ if (!capture_opts->iface_descr)
+ capture_opts->iface_descr = get_interface_descriptive_name(capture_opts->iface);
+
+ return(capture_opts->iface_descr);
+
+}
#endif /* HAVE_LIBPCAP */