forked from osmocom/wireshark
- fix warnings in prefs.c
- do not flush SSL debug output after each message but only once per packet svn path=/trunk/; revision=23680
This commit is contained in:
parent
6caaafbb6d
commit
aab2bf936e
|
@ -29,13 +29,13 @@
|
|||
#include "asm_utils.h"
|
||||
|
||||
/* String comparison func for dfilter_token GTree */
|
||||
int
|
||||
gint
|
||||
wrs_strcmp(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
return strcmp((const char*)a, (const char*)b);
|
||||
}
|
||||
|
||||
int
|
||||
gint
|
||||
wrs_strcmp_with_data(gconstpointer a, gconstpointer b, gpointer user_data _U_)
|
||||
{
|
||||
return strcmp((const char*)a, (const char*)b);
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
#ifndef __ASM_UTILS_H__
|
||||
#define __ASM_UTILS_H__
|
||||
|
||||
int wrs_strcmp(gconstpointer a, gconstpointer b);
|
||||
int wrs_strcmp_with_data(gconstpointer a, gconstpointer b, gpointer user_data);
|
||||
gint wrs_strcmp(gconstpointer a, gconstpointer b);
|
||||
gint wrs_strcmp_with_data(gconstpointer a, gconstpointer b, gpointer user_data);
|
||||
gboolean wrs_str_equal(gconstpointer a, gconstpointer b);
|
||||
|
||||
guchar wrs_check_charset(const guchar table[256], const char *str);
|
||||
|
|
|
@ -2499,6 +2499,12 @@ ssl_set_debug(char* name)
|
|||
debug_file_must_be_closed = 1;
|
||||
}
|
||||
|
||||
void
|
||||
ssl_debug_flush(void)
|
||||
{
|
||||
if (ssl_debug_file)
|
||||
fflush(ssl_debug_file);
|
||||
}
|
||||
|
||||
void
|
||||
ssl_debug_printf(const gchar* fmt, ...)
|
||||
|
@ -2513,7 +2519,6 @@ ssl_debug_printf(const gchar* fmt, ...)
|
|||
va_start(ap, fmt);
|
||||
ret += vfprintf(ssl_debug_file, fmt, ap);
|
||||
va_end(ap);
|
||||
fflush(ssl_debug_file);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2527,7 +2532,6 @@ ssl_print_text_data(const gchar* name, const guchar* data, gint len)
|
|||
fprintf(ssl_debug_file,"%c",data[i]);
|
||||
}
|
||||
fprintf(ssl_debug_file,"\n");
|
||||
fflush(ssl_debug_file);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2543,7 +2547,6 @@ ssl_print_data(const gchar* name, const guchar* data, gint len)
|
|||
fprintf(ssl_debug_file,"%.2x ",data[i]&255);
|
||||
}
|
||||
fprintf(ssl_debug_file,"\n");
|
||||
fflush(ssl_debug_file);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -473,6 +473,8 @@ extern void
|
|||
ssl_print_text_data(const gchar* name, const guchar* data, gint len);
|
||||
extern void
|
||||
ssl_set_debug(gchar* name);
|
||||
extern void
|
||||
ssl_debug_flush(void);
|
||||
#else
|
||||
|
||||
/* No debug: nullify debug operation*/
|
||||
|
|
|
@ -709,7 +709,9 @@ dissect_ssl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
first_record_in_frame = FALSE;
|
||||
}
|
||||
if (check_col(pinfo->cinfo, COL_INFO))
|
||||
col_set_fence(pinfo->cinfo, COL_INFO);
|
||||
col_set_fence(pinfo->cinfo, COL_INFO);
|
||||
|
||||
ssl_debug_flush();
|
||||
|
||||
tap_queue_packet(ssl_tap, pinfo, GINT_TO_POINTER(proto_ssl));
|
||||
}
|
||||
|
|
12
epan/prefs.c
12
epan/prefs.c
|
@ -118,11 +118,17 @@ static GTree *modules = NULL;
|
|||
*/
|
||||
static GTree *top_level_modules = NULL;
|
||||
|
||||
gint
|
||||
cmp_names(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
return g_ascii_strcasecmp((const gchar*)a, (const gchar*)b);
|
||||
}
|
||||
|
||||
/** Sets up memory used by proto routines. Called at program startup */
|
||||
void prefs_init(void)
|
||||
{
|
||||
modules = g_tree_new(g_ascii_strcasecmp);
|
||||
top_level_modules = g_tree_new(g_ascii_strcasecmp);
|
||||
modules = g_tree_new(cmp_names);
|
||||
top_level_modules = g_tree_new(cmp_names);
|
||||
|
||||
}
|
||||
|
||||
|
@ -194,7 +200,7 @@ prefs_register_module_or_subtree(module_t *parent, const char *name,
|
|||
module->description = description;
|
||||
module->apply_cb = apply_cb;
|
||||
module->prefs = NULL; /* no preferences, to start */
|
||||
module->submodules = g_tree_new(g_ascii_strcasecmp); /* no submodules, to start */
|
||||
module->submodules = g_tree_new(cmp_names); /* no submodules, to start */
|
||||
module->numprefs = 0;
|
||||
module->prefs_changed = FALSE;
|
||||
module->obsolete = FALSE;
|
||||
|
|
Loading…
Reference in New Issue