aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
diff options
context:
space:
mode:
authorsharpe <sharpe@f5534014-38df-0310-8fa8-9805f1628bb7>2004-01-03 18:40:08 +0000
committersharpe <sharpe@f5534014-38df-0310-8fa8-9805f1628bb7>2004-01-03 18:40:08 +0000
commitc0abb596d77b1d8c487065dac1f8b895bf2db171 (patch)
treebaf17f3e7d92f2855ed3571140193a98c0baa779 /tethereal.c
parent4f52121449d8819d108c0568dc51edca1cc8896c (diff)
Apply the patches from Tadaaki Nagao for a global version of disabled
protocols ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9538 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/tethereal.c b/tethereal.c
index 3a672629b3..04280099ba 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.212 2003/12/18 02:46:45 guy Exp $
+ * $Id: tethereal.c,v 1.213 2004/01/03 18:40:07 sharpe Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -782,9 +782,10 @@ main(int argc, char *argv[])
#endif /* _WIN32 */
char *gpf_path, *pf_path;
- char *dp_path;
+ char *gdp_path, *dp_path;
int gpf_open_errno, gpf_read_errno;
int pf_open_errno, pf_read_errno;
+ int gdp_open_errno, gdp_read_errno;
int dp_open_errno, dp_read_errno;
int err;
#ifdef HAVE_LIBPCAP
@@ -882,7 +883,21 @@ main(int argc, char *argv[])
g_resolv_flags = prefs->name_resolve;
/* Read the disabled protocols file. */
- read_disabled_protos_list(&dp_path, &dp_open_errno, &dp_read_errno);
+ read_disabled_protos_list(&gdp_path, &gdp_open_errno, &gdp_read_errno,
+ &dp_path, &dp_open_errno, &dp_read_errno);
+ if (gdp_path != NULL) {
+ if (gdp_open_errno != 0) {
+ fprintf(stderr,
+ "Could not open global disabled protocols file\n\"%s\": %s.\n",
+ gdp_path, strerror(gdp_open_errno));
+ }
+ if (gdp_read_errno != 0) {
+ fprintf(stderr,
+ "I/O error reading global disabled protocols file\n\"%s\": %s.\n",
+ gdp_path, strerror(gdp_read_errno));
+ }
+ g_free(gdp_path);
+ }
if (dp_path != NULL) {
if (dp_open_errno != 0) {
fprintf(stderr,
@@ -1375,7 +1390,7 @@ main(int argc, char *argv[])
prefs_apply_all();
/* disabled protocols as per configuration file */
- if (dp_path == NULL) {
+ if (gdp_path == NULL && dp_path == NULL) {
set_disabled_protos_list();
}