aboutsummaryrefslogtreecommitdiffstats
path: root/echld
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2013-11-18 07:25:12 +0000
committerJörg Mayer <jmayer@loplof.de>2013-11-18 07:25:12 +0000
commit7b80faa66f55f8be5f344691cb1de0fe364a6881 (patch)
tree34441cbb985ca9a1e27a36090fa7f08fa62983e5 /echld
parentadc82b16ba83b46d64cf094ad7c2ecaa442ffb2d (diff)
Fix some warnings that were really errors.
It would really help to fix the remaining warnings so that these files can be compiled with -Werror, which gets me to the quesiton: Is this code still maintained in some form or was it an interesting experiment that has been terminated? svn path=/trunk/; revision=53406
Diffstat (limited to 'echld')
-rw-r--r--echld/child.c10
-rw-r--r--echld/dispatcher.c10
-rw-r--r--echld/echld-int.h1
3 files changed, 7 insertions, 14 deletions
diff --git a/echld/child.c b/echld/child.c
index e40de30a41..cdab146dc7 100644
--- a/echld/child.c
+++ b/echld/child.c
@@ -223,7 +223,7 @@ static echld_bool_t param_set_cwd(char* val , char** err ) {
static unsigned packet_count = 0;
static char* param_get_packet_count(char** err) {
- if (child.state != CAPTURING || child.state != READING) {
+ if (child.state != CAPTURING && child.state != READING) {
*err = g_strdup("Must be reading or in-capture for packet_count");
return NULL;
}
@@ -306,7 +306,7 @@ static int out_file_type = WTAP_FILE_TYPE_SUBTYPE_PCAP;
#endif
static echld_bool_t param_set_out_file_type(char* val, char** err) {
- int oft = wtap_short_string_to_file_type(val);
+ int oft = wtap_short_string_to_file_type_subtype(val);
if (oft < 0) {
*err = g_strdup_printf("\"%s\" isn't a valid capture file type", val);
@@ -319,8 +319,8 @@ static echld_bool_t param_set_out_file_type(char* val, char** err) {
static char* param_get_out_file_type(char** err _U_) {
return g_strdup_printf("%s(%d): %s",
- wtap_file_type_short_string(out_file_type),
- out_file_type, wtap_file_type_string(out_file_type));
+ wtap_file_type_subtype_short_string(out_file_type),
+ out_file_type, wtap_file_type_subtype_string(out_file_type));
}
@@ -538,7 +538,7 @@ static long child_receive(guint8* b, size_t len, echld_chld_id_t chld_id, echld_
case ECHLD_GET_SUM: {
char* range;
- if (child.state != CAPTURING || child.state != READING || child.state != DONE) goto wrong_state;
+ if (child.state != CAPTURING && child.state != READING && child.state != DONE) goto wrong_state;
if ( child.dec->get_sum(b,len,&range) ) {
child_get_summary(range);
diff --git a/echld/dispatcher.c b/echld/dispatcher.c
index 3dbe8f0048..0684179770 100644
--- a/echld/dispatcher.c
+++ b/echld/dispatcher.c
@@ -202,7 +202,6 @@ static void dispatcher_err(int errnum, const char* fmt, ...) {
static char* intflist2json(GList* if_list, char** if_cap_err) {
#define ADDRSTRLEN 46 /* Covers IPv4 & IPv6 */
- int i;
GList *if_entry;
if_info_t *if_info;
GSList *addr;
@@ -212,7 +211,6 @@ static char* intflist2json(GList* if_list, char** if_cap_err) {
GString *str = g_string_new("{ what='interfaces', interfaces={ \n");
char* s;
- i = 1; /* Interface id number */
for (if_entry = g_list_first(if_list); if_entry != NULL;
if_entry = g_list_next(if_entry)) {
if_info = (if_info_t *)if_entry->data;
@@ -392,7 +390,7 @@ static char* param_get_capture_types(char** err _U_) {
for (i = 0; i < WTAP_NUM_FILE_TYPES_SUBTYPES; i++) {
if (wtap_dump_can_open(i)) {
g_string_append_printf(str,"%s: %s\n",
- wtap_file_type_short_string(i), wtap_file_type_string(i));
+ wtap_file_type_subtype_short_string(i), wtap_file_type_subtype_string(i));
}
}
@@ -1025,14 +1023,8 @@ void dispatcher_alrm(int sig _U_) {
void echld_dispatcher_start(int* in_pipe_fds, int* out_pipe_fds, char* argv0, int (*main)(int, char **)) {
static struct dispatcher d;
int i;
-#ifdef DEBUG_DISPATCHER
- int dbg_fd;
-#endif
DISP_DBG_INIT();
-#ifdef DEBUG_DISPATCHER
- dbg_fd = fileno(debug_fp);
-#endif
DISP_DBG((2,"Dispatcher Starting"));
diff --git a/echld/echld-int.h b/echld/echld-int.h
index fc745b62c1..708f439af6 100644
--- a/echld/echld-int.h
+++ b/echld/echld-int.h
@@ -70,6 +70,7 @@
#include "cfile.h"
#include "wsutil/crash_info.h"
#include "wsutil/privileges.h"
+#include "wsutil/filesystem.h"
#include "epan/epan.h"
#include "epan/prefs.h"
#include "epan/ex-opt.h"