forked from osmocom/wireshark
Revert "tap: change glib functions to wmem."
This reverts commit 2e9f3c5d36
.
It breaks the registration of codec, dissector and libwiretap plugins.
Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de
Reviewed-on: https://code.wireshark.org/review/16012
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
parent
ff845123f1
commit
a383e692c8
9
dftest.c
9
dftest.c
|
@ -82,6 +82,15 @@ main(int argc, char **argv)
|
|||
timestamp_set_type(TS_RELATIVE);
|
||||
timestamp_set_seconds_type(TS_SECONDS_DEFAULT);
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
/* Register all the plugin types we have. */
|
||||
epan_register_plugin_types(); /* Types known to libwireshark */
|
||||
|
||||
/* Scan for plugins. This does *not* call their registration routines;
|
||||
that's done later. */
|
||||
scan_plugins();
|
||||
#endif
|
||||
|
||||
/* Register all dissectors; we must do this before checking for the
|
||||
"-g" flag, as the "-g" flag dumps a list of fields registered
|
||||
by the dissectors, and we must do it before we read the preferences,
|
||||
|
|
|
@ -263,7 +263,7 @@ ctx_handle_hash(gconstpointer k)
|
|||
static void
|
||||
sid_snooping_init(void)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if(lsa_policy_information_tap_installed){
|
||||
remove_tap_listener(&lsa_policy_information_tap_installed);
|
||||
|
@ -310,8 +310,8 @@ sid_name_snooping=FALSE;
|
|||
/* error, we failed to attach to the tap. clean up */
|
||||
|
||||
report_failure( "Couldn't register proto_reg_handoff_smb_sidsnooping()/lsa_policy_information tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
lsa_policy_information_tap_installed=TRUE;
|
||||
|
@ -324,8 +324,8 @@ sid_name_snooping=FALSE;
|
|||
/* error, we failed to attach to the tap. clean up */
|
||||
|
||||
report_failure( "Couldn't register proto_reg_handoff_smb_sidsnooping()/samr_query_dispinfo tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
samr_query_dispinfo_tap_installed=TRUE;
|
||||
|
|
|
@ -6887,7 +6887,7 @@ dissect_session_setup_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
const ntlmssp_header_t *ntlmssph;
|
||||
|
||||
if (!ntlmssp_tap_id) {
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
/* We don't specify any callbacks at all.
|
||||
* Instead we manually fetch the tapped data after the
|
||||
* security blob has been fully dissected and before
|
||||
|
@ -6898,7 +6898,7 @@ dissect_session_setup_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
if (!error_string) {
|
||||
ntlmssp_tap_id = find_tap_id("ntlmssp");
|
||||
} else {
|
||||
wmem_free(NULL, error_string);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2772,7 +2772,7 @@ dissect_smb2_session_setup_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
int idx;
|
||||
|
||||
if (!ntlmssp_tap_id) {
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
/* We don't specify any callbacks at all.
|
||||
* Instead we manually fetch the tapped data after the
|
||||
* security blob has been fully dissected and before
|
||||
|
@ -2783,7 +2783,7 @@ dissect_smb2_session_setup_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
if (!error_string) {
|
||||
ntlmssp_tap_id = find_tap_id("ntlmssp");
|
||||
} else {
|
||||
wmem_free(NULL, error_string);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
14
epan/epan.c
14
epan/epan.c
|
@ -24,7 +24,6 @@
|
|||
#include <stdarg.h>
|
||||
|
||||
#include <wsutil/wsgcrypt.h>
|
||||
#include <wsutil/plugins.h>
|
||||
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
#include <gnutls/gnutls.h>
|
||||
|
@ -119,12 +118,6 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da
|
|||
#ifdef HAVE_LIBGNUTLS
|
||||
gnutls_global_init();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
/* Register all the plugin types we have. */
|
||||
epan_register_plugin_types(); /* Types known to libwireshark */
|
||||
#endif
|
||||
|
||||
TRY {
|
||||
tap_init();
|
||||
prefs_init();
|
||||
|
@ -162,13 +155,6 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da
|
|||
status = FALSE;
|
||||
}
|
||||
ENDTRY;
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
/* Scan for plugins. This does *not* call their registration routines;
|
||||
that's done later. */
|
||||
scan_plugins();
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
48
epan/tap.c
48
epan/tap.c
|
@ -39,7 +39,6 @@
|
|||
#include <epan/packet_info.h>
|
||||
#include <epan/dfilter/dfilter.h>
|
||||
#include <epan/tap.h>
|
||||
#include <epan/wmem/wmem_list.h>
|
||||
|
||||
static gboolean tapping_is_active=FALSE;
|
||||
|
||||
|
@ -119,7 +118,7 @@ typedef struct {
|
|||
void (*register_tap_listener_fn)(void); /* routine to call to register tap listener */
|
||||
} tap_plugin;
|
||||
|
||||
static wmem_list_t *tap_plugins = NULL;
|
||||
static GSList *tap_plugins = NULL;
|
||||
|
||||
/*
|
||||
* Callback for each plugin found.
|
||||
|
@ -149,9 +148,9 @@ DIAG_ON(pedantic)
|
|||
/*
|
||||
* Add this one to the list of tap plugins.
|
||||
*/
|
||||
plugin = wmem_new(NULL, tap_plugin);
|
||||
plugin = (tap_plugin *)g_malloc(sizeof (tap_plugin));
|
||||
plugin->register_tap_listener_fn = register_tap_listener_fn;
|
||||
wmem_list_append(tap_plugins, plugin);
|
||||
tap_plugins = g_slist_append(tap_plugins, plugin);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -175,7 +174,7 @@ register_tap_plugin_listener(gpointer data, gpointer user_data _U_)
|
|||
void
|
||||
register_all_plugin_tap_listeners(void)
|
||||
{
|
||||
wmem_list_foreach(tap_plugins, register_tap_plugin_listener, NULL);
|
||||
g_slist_foreach(tap_plugins, register_tap_plugin_listener, NULL);
|
||||
}
|
||||
#endif /* HAVE_PLUGINS */
|
||||
|
||||
|
@ -189,7 +188,6 @@ void
|
|||
tap_init(void)
|
||||
{
|
||||
tap_packet_index=0;
|
||||
tap_plugins = wmem_list_new(NULL);
|
||||
}
|
||||
|
||||
/* **********************************************************************
|
||||
|
@ -224,9 +222,9 @@ register_tap(const char *name)
|
|||
return tap_id;
|
||||
}
|
||||
|
||||
td=wmem_new(NULL, tap_dissector_t);
|
||||
td=(tap_dissector_t *)g_malloc(sizeof(tap_dissector_t));
|
||||
td->next=NULL;
|
||||
td->name = wmem_strdup(NULL, name);
|
||||
td->name = g_strdup(name);
|
||||
|
||||
if(!tap_dissector_list){
|
||||
tap_dissector_list=td;
|
||||
|
@ -508,8 +506,10 @@ free_tap_listener(volatile tap_listener_t *tl)
|
|||
if(tl->code){
|
||||
dfilter_free(tl->code);
|
||||
}
|
||||
wmem_free(NULL, tl->fstring);
|
||||
wmem_free(NULL, (void*)tl);
|
||||
g_free(tl->fstring);
|
||||
DIAG_OFF(cast-qual)
|
||||
g_free((gpointer)tl);
|
||||
DIAG_ON(cast-qual)
|
||||
}
|
||||
|
||||
/* this function attaches the tap_listener to the named tap.
|
||||
|
@ -518,28 +518,30 @@ free_tap_listener(volatile tap_listener_t *tl)
|
|||
* non-NULL: error, return value points to GString containing error
|
||||
* message.
|
||||
*/
|
||||
gchar *
|
||||
GString *
|
||||
register_tap_listener(const char *tapname, void *tapdata, const char *fstring,
|
||||
guint flags, tap_reset_cb reset, tap_packet_cb packet, tap_draw_cb draw)
|
||||
{
|
||||
volatile tap_listener_t *tl;
|
||||
int tap_id;
|
||||
dfilter_t *code=NULL;
|
||||
gchar *error_string = NULL;
|
||||
GString *error_string;
|
||||
gchar *err_msg;
|
||||
|
||||
tap_id=find_tap_id(tapname);
|
||||
if(!tap_id){
|
||||
error_string = wmem_strdup_printf(NULL, "Tap %s not found", tapname);
|
||||
error_string = g_string_new("");
|
||||
g_string_printf(error_string, "Tap %s not found", tapname);
|
||||
return error_string;
|
||||
}
|
||||
|
||||
tl=wmem_new0(NULL, volatile tap_listener_t);
|
||||
tl=(volatile tap_listener_t *)g_malloc0(sizeof(tap_listener_t));
|
||||
tl->needs_redraw=TRUE;
|
||||
tl->flags=flags;
|
||||
if(fstring){
|
||||
if(!dfilter_compile(fstring, &code, &err_msg)){
|
||||
error_string = wmem_strdup_printf(NULL,
|
||||
error_string = g_string_new("");
|
||||
g_string_printf(error_string,
|
||||
"Filter \"%s\" is invalid - %s",
|
||||
fstring, err_msg);
|
||||
g_free(err_msg);
|
||||
|
@ -547,7 +549,7 @@ register_tap_listener(const char *tapname, void *tapdata, const char *fstring,
|
|||
return error_string;
|
||||
}
|
||||
}
|
||||
tl->fstring=wmem_strdup(NULL, fstring);
|
||||
tl->fstring=g_strdup(fstring);
|
||||
tl->code=code;
|
||||
|
||||
tl->tap_id=tap_id;
|
||||
|
@ -564,12 +566,12 @@ register_tap_listener(const char *tapname, void *tapdata, const char *fstring,
|
|||
|
||||
/* this function sets a new dfilter to a tap listener
|
||||
*/
|
||||
gchar *
|
||||
GString *
|
||||
set_tap_dfilter(void *tapdata, const char *fstring)
|
||||
{
|
||||
volatile tap_listener_t *tl=NULL,*tl2;
|
||||
dfilter_t *code=NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
gchar *err_msg;
|
||||
|
||||
if(!tap_listener_queue){
|
||||
|
@ -594,19 +596,19 @@ set_tap_dfilter(void *tapdata, const char *fstring)
|
|||
tl->code=NULL;
|
||||
}
|
||||
tl->needs_redraw=TRUE;
|
||||
wmem_free(NULL, tl->fstring);
|
||||
g_free(tl->fstring);
|
||||
if(fstring){
|
||||
if(!dfilter_compile(fstring, &code, &err_msg)){
|
||||
tl->fstring=NULL;
|
||||
error_string = wmem_strdup_printf(
|
||||
NULL,
|
||||
error_string = g_string_new("");
|
||||
g_string_printf(error_string,
|
||||
"Filter \"%s\" is invalid - %s",
|
||||
fstring, err_msg);
|
||||
wmem_free(NULL, err_msg);
|
||||
g_free(err_msg);
|
||||
return error_string;
|
||||
}
|
||||
}
|
||||
tl->fstring=wmem_strdup(NULL, fstring);
|
||||
tl->fstring=g_strdup(fstring);
|
||||
tl->code=code;
|
||||
}
|
||||
|
||||
|
|
|
@ -140,8 +140,8 @@ WS_DLL_PUBLIC void draw_tap_listeners(gboolean draw_all);
|
|||
/** this function attaches the tap_listener to the named tap.
|
||||
* function returns :
|
||||
* NULL: ok.
|
||||
* non-NULL: error, return value points to gchar* containing error
|
||||
* message. This value must be freed with wmem_free().
|
||||
* non-NULL: error, return value points to GString containing error
|
||||
* message.
|
||||
* @param tapname The name of the tap we want to listen to.
|
||||
* @param tapdata is the instance identifier. The tap system uses the value of this
|
||||
* pointer to distinguish between different instances of a tap.
|
||||
|
@ -211,12 +211,12 @@ WS_DLL_PUBLIC void draw_tap_listeners(gboolean draw_all);
|
|||
* or the file has been [re]read completely.
|
||||
*/
|
||||
|
||||
WS_DLL_PUBLIC gchar *register_tap_listener(const char *tapname, void *tapdata,
|
||||
WS_DLL_PUBLIC GString *register_tap_listener(const char *tapname, void *tapdata,
|
||||
const char *fstring, guint flags, tap_reset_cb tap_reset,
|
||||
tap_packet_cb tap_packet, tap_draw_cb tap_draw);
|
||||
|
||||
/** This function sets a new dfilter to a tap listener */
|
||||
WS_DLL_PUBLIC gchar *set_tap_dfilter(void *tapdata, const char *fstring);
|
||||
WS_DLL_PUBLIC GString *set_tap_dfilter(void *tapdata, const char *fstring);
|
||||
|
||||
/** This function recompiles dfilter for all registered tap listeners */
|
||||
WS_DLL_PUBLIC void tap_listeners_dfilter_recompile(void);
|
||||
|
|
|
@ -591,15 +591,15 @@ void lua_prime_all_fields(proto_tree* tree _U_) {
|
|||
|
||||
if (fake_tap && fake_tap_filter->len > strlen("frame")) {
|
||||
/* a boring tap :-) */
|
||||
gchar* error = register_tap_listener("frame",
|
||||
GString* error = register_tap_listener("frame",
|
||||
&fake_tap,
|
||||
fake_tap_filter->str,
|
||||
0, /* XXX - do we need the protocol tree or columns? */
|
||||
NULL, NULL, NULL);
|
||||
|
||||
if (error) {
|
||||
report_failure("while registering lua_fake_tap:\n%s", error);
|
||||
wmem_free(NULL, error);
|
||||
report_failure("while registering lua_fake_tap:\n%s",error->str);
|
||||
g_string_free(error,TRUE);
|
||||
} else if (!dfilter_compile(fake_tap_filter->str, &wslua_dfilter, &err_msg)) {
|
||||
report_failure("while compiling dfilter \"%s\" for wslua: %s", fake_tap_filter->str, err_msg);
|
||||
g_free(err_msg);
|
||||
|
|
|
@ -210,7 +210,7 @@ WSLUA_CONSTRUCTOR Listener_new(lua_State* L) {
|
|||
const gchar* filter = luaL_optstring(L,WSLUA_OPTARG_Listener_new_FILTER,NULL);
|
||||
const gboolean all_fields = wslua_optbool(L, WSLUA_OPTARG_Listener_new_ALLFIELDS, FALSE);
|
||||
Listener tap;
|
||||
gchar* error;
|
||||
GString* error;
|
||||
|
||||
tap = (Listener)g_malloc(sizeof(struct _wslua_tap));
|
||||
|
||||
|
@ -237,8 +237,8 @@ WSLUA_CONSTRUCTOR Listener_new(lua_State* L) {
|
|||
g_free(tap->name);
|
||||
g_free(tap);
|
||||
/* WSLUA_ERROR(new_tap,"tap registration error"); */
|
||||
lua_pushfstring(L,"Error while registering tap:\n%s",error);
|
||||
wmem_free(NULL, error);
|
||||
lua_pushfstring(L,"Error while registering tap:\n%s",error->str);
|
||||
g_string_free(error,TRUE);
|
||||
luaL_error(L,lua_tostring(L,-1));
|
||||
}
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ extern
|
|||
void
|
||||
proto_reg_handoff_mate(void)
|
||||
{
|
||||
gchar* tap_error = NULL;
|
||||
GString* tap_error = NULL;
|
||||
|
||||
if ( *pref_mate_config_filename != '\0' ) {
|
||||
|
||||
|
@ -354,8 +354,8 @@ proto_reg_handoff_mate(void)
|
|||
(tap_draw_cb) NULL);
|
||||
|
||||
if ( tap_error ) {
|
||||
g_warning("mate: couldn't (re)register tap: %s", tap_error);
|
||||
wmem_free(NULL, tap_error);
|
||||
g_warning("mate: couldn't (re)register tap: %s",tap_error->str);
|
||||
g_string_free(tap_error, TRUE);
|
||||
mate_tap_data = 0;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1332,7 +1332,7 @@ protocolinfo_init(char *field)
|
|||
{
|
||||
pci_t *rs;
|
||||
header_field_info *hfi;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
char hfibuf[100];
|
||||
|
||||
hfi=proto_registrar_get_byname(field);
|
||||
|
@ -1356,8 +1356,8 @@ protocolinfo_init(char *field)
|
|||
if(error_string){
|
||||
/* error, we failed to attach to the tap. complain and clean up */
|
||||
fprintf(stderr, "rawshark: Couldn't register field extraction tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
if(rs->filter){
|
||||
g_free(rs->filter);
|
||||
}
|
||||
|
|
10
tfshark.c
10
tfshark.c
|
@ -913,6 +913,16 @@ main(int argc, char *argv[])
|
|||
|
||||
init_open_routines();
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
/* Register all the plugin types we have. */
|
||||
epan_register_plugin_types(); /* Types known to libwireshark */
|
||||
|
||||
/* Scan for plugins. This does *not* call their registration routines;
|
||||
that's done later. */
|
||||
scan_plugins();
|
||||
|
||||
#endif
|
||||
|
||||
/* Register all dissectors; we must do this before checking for the
|
||||
"-G" flag, as the "-G" flag dumps information registered by the
|
||||
dissectors, and we must do it before we read the preferences, in
|
||||
|
|
6
tshark.c
6
tshark.c
|
@ -1196,8 +1196,14 @@ main(int argc, char *argv[])
|
|||
init_open_routines();
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
/* Register all the plugin types we have. */
|
||||
epan_register_plugin_types(); /* Types known to libwireshark */
|
||||
wtap_register_plugin_types(); /* Types known to libwiretap */
|
||||
|
||||
/* Scan for plugins. This does *not* call their registration routines;
|
||||
that's done later. */
|
||||
scan_plugins();
|
||||
|
||||
/* Register all libwiretap plugin modules. */
|
||||
register_all_wiretap_modules();
|
||||
#endif
|
||||
|
|
|
@ -210,7 +210,7 @@ static void camelsrt_draw(void *phs)
|
|||
static void camelsrt_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
struct camelsrt_t *p_camelsrt;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
p_camelsrt = g_new(struct camelsrt_t, 1);
|
||||
if (!strncmp(opt_arg, "camel,srt,", 9)) {
|
||||
|
@ -234,8 +234,8 @@ static void camelsrt_init(const char *opt_arg, void *userdata _U_)
|
|||
g_free(p_camelsrt);
|
||||
|
||||
fprintf(stderr, "tshark: Couldn't register camel,srt tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -530,7 +530,7 @@ comparestat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
comparestat_t *cs;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
gint start, stop, ttl, order, pos = 0;
|
||||
gdouble variance;
|
||||
|
||||
|
@ -581,8 +581,8 @@ comparestat_init(const char *opt_arg, void *userdata _U_)
|
|||
g_hash_table_destroy(cs->packet_set);
|
||||
g_free(cs);
|
||||
|
||||
fprintf(stderr, "tshark: Couldn't register compare tap: %s\n", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
fprintf(stderr, "tshark: Couldn't register compare tap: %s\n", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ diameteravp_init(const char *opt_arg, void *userdata _U_)
|
|||
guint opt_count = 0;
|
||||
guint opt_idx = 0;
|
||||
GString *filter = NULL;
|
||||
gchar *error_string = NULL;
|
||||
GString *error_string = NULL;
|
||||
|
||||
ds = g_new(diameteravp_t, 1);
|
||||
ds->frame = 0;
|
||||
|
@ -263,8 +263,8 @@ diameteravp_init(const char *opt_arg, void *userdata _U_)
|
|||
g_free(ds);
|
||||
|
||||
fprintf(stderr, "tshark: Couldn't register diam,csv tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ endpoints_draw(void *arg)
|
|||
void init_hostlists(struct register_ct *ct, const char *filter)
|
||||
{
|
||||
endpoints_t *iu;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
iu = g_new0(endpoints_t, 1);
|
||||
iu->type = proto_get_protocol_short_name(find_protocol_by_id(get_conversation_proto_id(ct)));
|
||||
|
@ -124,8 +124,8 @@ void init_hostlists(struct register_ct *ct, const char *filter)
|
|||
if (error_string) {
|
||||
g_free(iu);
|
||||
fprintf(stderr, "tshark: Couldn't register endpoint tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ static void expert_stat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
const char *args = NULL;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
expert_tapdata_t *hs;
|
||||
int n;
|
||||
|
||||
|
@ -257,8 +257,8 @@ static void expert_stat_init(const char *opt_arg, void *userdata _U_)
|
|||
expert_stat_packet,
|
||||
expert_stat_draw);
|
||||
if (error_string) {
|
||||
printf("Expert tap error (%s)!\n", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
printf("Expert tap error (%s)!\n", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
g_free(hs);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -445,7 +445,7 @@ static void follow_stream(const char *opt_argp, void *userdata)
|
|||
{
|
||||
follow_info_t *follow_info;
|
||||
cli_follow_info_t* cli_follow_info;
|
||||
gchar *errp;
|
||||
GString *errp;
|
||||
register_follow_t* follower = (register_follow_t*)userdata;
|
||||
follow_index_filter_func index_filter;
|
||||
follow_address_filter_func address_filter;
|
||||
|
@ -488,7 +488,7 @@ static void follow_stream(const char *opt_argp, void *userdata)
|
|||
if (errp != NULL)
|
||||
{
|
||||
follow_free(follow_info);
|
||||
wmem_free(NULL, errp);
|
||||
g_string_free(errp, TRUE);
|
||||
follow_exit("Error registering tap listener.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -320,7 +320,7 @@ static void
|
|||
gsm_a_stat_init(const char *opt_arg _U_, void *userdata _U_)
|
||||
{
|
||||
gsm_a_stat_t *stat_p;
|
||||
gchar *err_p;
|
||||
GString *err_p;
|
||||
|
||||
stat_p = g_new(gsm_a_stat_t, 1);
|
||||
|
||||
|
@ -335,7 +335,7 @@ gsm_a_stat_init(const char *opt_arg _U_, void *userdata _U_)
|
|||
if (err_p != NULL)
|
||||
{
|
||||
g_free(stat_p);
|
||||
wmem_free(NULL, err_p);
|
||||
g_string_free(err_p, TRUE);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ hosts_draw(void *dummy _U_)
|
|||
static void
|
||||
hosts_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
gchar **tokens;
|
||||
gint opt_count;
|
||||
|
||||
|
@ -128,8 +128,8 @@ hosts_init(const char *opt_arg, void *userdata _U_)
|
|||
if (error_string) {
|
||||
/* error, we failed to attach to the tap. clean up */
|
||||
fprintf(stderr, "tshark: Couldn't register " TAP_NAME " tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -284,7 +284,7 @@ httpstat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
httpstat_t *sp;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (!strncmp (opt_arg, "http,stat,", 10)) {
|
||||
filter = opt_arg+10;
|
||||
|
@ -314,8 +314,8 @@ httpstat_init(const char *opt_arg, void *userdata _U_)
|
|||
g_free(sp->filter);
|
||||
g_free(sp);
|
||||
fprintf (stderr, "tshark: Couldn't register http,stat tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@ icmpstat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
icmpstat_t *icmpstat;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (strstr(opt_arg, "icmp,srt,"))
|
||||
filter = opt_arg + strlen("icmp,srt,");
|
||||
|
@ -305,8 +305,8 @@ icmpstat_init(const char *opt_arg, void *userdata _U_)
|
|||
g_free(icmpstat);
|
||||
|
||||
fprintf(stderr, "tshark: Couldn't register icmp,srt tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ icmpv6stat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
icmpv6stat_t *icmpv6stat;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (strstr(opt_arg, "icmpv6,srt,"))
|
||||
filter = opt_arg + strlen("icmpv6,srt,");
|
||||
|
@ -306,8 +306,8 @@ icmpv6stat_init(const char *opt_arg, void *userdata _U_)
|
|||
g_free(icmpv6stat);
|
||||
|
||||
fprintf(stderr, "tshark: Couldn't register icmpv6,srt tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1220,7 +1220,7 @@ iostat_draw(void *arg)
|
|||
static void
|
||||
register_io_tap(io_stat_t *io, int i, const char *filter)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
const char *flt;
|
||||
int j;
|
||||
size_t namelen;
|
||||
|
@ -1372,8 +1372,8 @@ register_io_tap(io_stat_t *io, int i, const char *filter)
|
|||
g_free(io->items);
|
||||
g_free(io);
|
||||
fprintf(stderr, "\ntshark: Couldn't register io,stat tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ iousers_draw(void *arg)
|
|||
void init_iousers(struct register_ct *ct, const char *filter)
|
||||
{
|
||||
io_users_t *iu;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
iu = g_new0(io_users_t, 1);
|
||||
iu->type = proto_get_protocol_short_name(find_protocol_by_id(get_conversation_proto_id(ct)));
|
||||
|
@ -226,8 +226,8 @@ void init_iousers(struct register_ct *ct, const char *filter)
|
|||
if (error_string) {
|
||||
g_free(iu);
|
||||
fprintf(stderr, "tshark: Couldn't register conversations tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -517,7 +517,7 @@ static void mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
mac_lte_stat_t *hs;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
/* Check for a filter string */
|
||||
if (strncmp(opt_arg, "mac-lte,stat,", 13) == 0) {
|
||||
|
@ -539,7 +539,7 @@ static void mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
|
|||
mac_lte_stat_packet,
|
||||
mac_lte_stat_draw);
|
||||
if (error_string) {
|
||||
wmem_free(NULL, error_string);
|
||||
g_string_free(error_string, TRUE);
|
||||
g_free(hs);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ protocolinfo_init(const char *opt_arg, void *userdata _U_)
|
|||
const char *field = NULL;
|
||||
const char *filter = NULL;
|
||||
header_field_info *hfi;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (!strncmp("proto,colinfo,", opt_arg, 14)) {
|
||||
filter = opt_arg+14;
|
||||
|
@ -120,8 +120,8 @@ protocolinfo_init(const char *opt_arg, void *userdata _U_)
|
|||
if (error_string) {
|
||||
/* error, we failed to attach to the tap. complain and clean up */
|
||||
fprintf(stderr, "tshark: Couldn't register proto,colinfo tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
g_free(rs->filter);
|
||||
g_free(rs);
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ protohierstat_init(const char *opt_arg, void *userdata _U_)
|
|||
phs_t *rs;
|
||||
int pos = 0;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (strcmp("io,phs", opt_arg) == 0) {
|
||||
/* No arguments */
|
||||
|
@ -198,8 +198,8 @@ protohierstat_init(const char *opt_arg, void *userdata _U_)
|
|||
g_free(rs);
|
||||
|
||||
fprintf(stderr, "tshark: Couldn't register io,phs tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -365,7 +365,7 @@ static void rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
rlc_lte_stat_t *hs;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
/* Check for a filter string */
|
||||
if (strncmp(opt_arg, "rlc-lte,stat,", 13) == 0) {
|
||||
|
@ -392,7 +392,7 @@ static void rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
|
|||
rlc_lte_stat_packet,
|
||||
rlc_lte_stat_draw);
|
||||
if (error_string) {
|
||||
wmem_free(NULL, error_string);
|
||||
g_string_free(error_string, TRUE);
|
||||
g_free(hs);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@ rpcprogs_draw(void *dummy _U_)
|
|||
static void
|
||||
rpcprogs_init(const char *opt_arg _U_, void *userdata _U_)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (already_enabled) {
|
||||
return;
|
||||
|
@ -221,8 +221,8 @@ rpcprogs_init(const char *opt_arg _U_, void *userdata _U_)
|
|||
error_string = register_tap_listener("rpc", NULL, NULL, 0, NULL, rpcprogs_packet, rpcprogs_draw);
|
||||
if (error_string) {
|
||||
fprintf(stderr, "tshark: Couldn't register rpc,programs tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ rtd_draw(void *arg)
|
|||
static void
|
||||
init_rtd_tables(register_rtd_t* rtd, const char *filter)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
rtd_t* ui;
|
||||
|
||||
ui = g_new0(rtd_t, 1);
|
||||
|
@ -116,8 +116,8 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter)
|
|||
error_string = register_tap_listener(get_rtd_tap_listener_name(rtd), &ui->rtd, filter, 0, NULL, get_rtd_packet_func(rtd), rtd_draw);
|
||||
if (error_string) {
|
||||
free_rtd_table(&ui->rtd.stat_table, NULL, NULL);
|
||||
fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ rtp_streams_stat_draw(void *arg _U_)
|
|||
static void
|
||||
rtp_streams_stat_init(const char *opt_arg _U_, void *userdata _U_)
|
||||
{
|
||||
gchar *err_p;
|
||||
GString *err_p;
|
||||
|
||||
err_p =
|
||||
register_tap_listener("rtp", &the_tapinfo_struct, NULL, 0,
|
||||
|
@ -149,7 +149,7 @@ rtp_streams_stat_init(const char *opt_arg _U_, void *userdata _U_)
|
|||
|
||||
if (err_p != NULL)
|
||||
{
|
||||
wmem_free(NULL, err_p);
|
||||
g_string_free(err_p, TRUE);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ rtspstat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
rtspstat_t *sp;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (!strncmp (opt_arg, "rtsp,stat,", 10)) {
|
||||
filter = opt_arg+10;
|
||||
|
@ -266,8 +266,8 @@ rtspstat_init(const char *opt_arg, void *userdata _U_)
|
|||
g_free(sp->filter);
|
||||
g_free(sp);
|
||||
fprintf (stderr, "tshark: Couldn't register rtsp,stat tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ static void
|
|||
sctpstat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
sctpstat_t *hs;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
hs = (sctpstat_t *)g_malloc(sizeof(sctpstat_t));
|
||||
if (!strncmp(opt_arg, "sctp,stat,", 11)) {
|
||||
|
@ -218,8 +218,8 @@ sctpstat_init(const char *opt_arg, void *userdata _U_)
|
|||
g_free(hs);
|
||||
|
||||
fprintf(stderr, "tshark: Couldn't register sctp,stat tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ simple_draw(void *arg)
|
|||
static void
|
||||
init_stat_table(stat_tap_table_ui *new_stat_tap, const char *filter)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
table_stat_t* ui;
|
||||
|
||||
ui = g_new0(table_stat_t, 1);
|
||||
|
@ -116,8 +116,8 @@ init_stat_table(stat_tap_table_ui *new_stat_tap, const char *filter)
|
|||
error_string = register_tap_listener(new_stat_tap->tap_name, &ui->stats, filter, 0, NULL, new_stat_tap->packet_func, simple_draw);
|
||||
if (error_string) {
|
||||
/* free_rtd_table(&ui->rtd.stat_table, NULL, NULL); */
|
||||
fprintf(stderr, "tshark: Couldn't register tap: %s\n", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
fprintf(stderr, "tshark: Couldn't register tap: %s\n", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -394,7 +394,7 @@ sipstat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
sipstat_t *sp;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (strncmp (opt_arg, "sip,stat,", 9) == 0) {
|
||||
filter = opt_arg+9;
|
||||
|
@ -424,8 +424,8 @@ sipstat_init(const char *opt_arg, void *userdata _U_)
|
|||
g_free(sp->filter);
|
||||
g_free(sp);
|
||||
fprintf (stderr, "tshark: Couldn't register sip,stat tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ smbsids_draw(void *pss _U_)
|
|||
static void
|
||||
smbsids_init(const char *opt_arg _U_, void *userdata _U_)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (!sid_name_snooping) {
|
||||
fprintf(stderr, "The -z smb,sids function needs SMB/SID-Snooping to be enabled.\n");
|
||||
|
@ -81,8 +81,8 @@ smbsids_init(const char *opt_arg _U_, void *userdata _U_)
|
|||
error_string = register_tap_listener("smb", NULL, NULL, 0, NULL, smbsids_packet, smbsids_draw);
|
||||
if (error_string) {
|
||||
fprintf(stderr, "tshark: Couldn't register smb,sids tap:%s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ static void
|
|||
init_srt_tables(register_srt_t* srt, const char *filter)
|
||||
{
|
||||
srt_t *ui;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
ui = g_new0(srt_t, 1);
|
||||
ui->type = proto_get_protocol_short_name(find_protocol_by_id(get_srt_proto_id(srt)));
|
||||
|
@ -130,8 +130,8 @@ init_srt_tables(register_srt_t* srt, const char *filter)
|
|||
if (error_string) {
|
||||
free_srt_table(srt, global_srt_array, NULL, NULL);
|
||||
g_free(ui);
|
||||
fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ static void
|
|||
init_stats_tree(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
char *abbr = stats_tree_get_abbr(opt_arg);
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
stats_tree_cfg *cfg = NULL;
|
||||
stats_tree *st = NULL;
|
||||
|
||||
|
@ -99,8 +99,7 @@ init_stats_tree(const char *opt_arg, void *userdata _U_)
|
|||
draw_stats_tree);
|
||||
|
||||
if (error_string) {
|
||||
report_failure("stats_tree for: %s failed to attach to the tap: %s", cfg->name, error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
report_failure("stats_tree for: %s failed to attach to the tap: %s", cfg->name, error_string->str);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ sv_packet(void *prs _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void
|
|||
static void
|
||||
svstat_init(const char *opt_arg _U_, void *userdata _U_)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener(
|
||||
"sv",
|
||||
|
@ -69,8 +69,8 @@ svstat_init(const char *opt_arg _U_, void *userdata _U_)
|
|||
if (error_string) {
|
||||
/* error, we failed to attach to the tap. clean up */
|
||||
fprintf(stderr, "tshark: Couldn't register sv,stat tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ wspstat_init(const char *opt_arg, void *userdata _U_)
|
|||
wspstat_t *sp;
|
||||
const char *filter = NULL;
|
||||
guint32 i;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
wsp_status_code_t *sc;
|
||||
const value_string *wsp_vals_status_p;
|
||||
|
||||
|
@ -272,8 +272,8 @@ wspstat_init(const char *opt_arg, void *userdata _U_)
|
|||
g_hash_table_foreach( sp->hash, (GHFunc) wsp_free_hash_table, NULL ) ;
|
||||
g_hash_table_destroy( sp->hash );
|
||||
fprintf(stderr, "tshark: Couldn't register wsp,stat tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -699,7 +699,7 @@ gtk_comparestat_init(const char *opt_arg, void* userdata _U_)
|
|||
gdouble variance;
|
||||
gint start, stop,ttl, order, pos=0;
|
||||
const char *filter=NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if(sscanf(opt_arg,"compare,%d,%d,%d,%d,%lf%n",&start, &stop, &ttl, &order, &variance, &pos)==5){
|
||||
if(*(opt_arg+pos)==',')
|
||||
|
@ -791,8 +791,8 @@ gtk_comparestat_init(const char *opt_arg, void* userdata _U_)
|
|||
|
||||
error_string=register_tap_listener("ip", cs, filter, 0, comparestat_reset, comparestat_packet, comparestat_draw);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
gtk_tree_store_clear(cs->simple_list);
|
||||
g_hash_table_destroy(cs->packet_set);
|
||||
g_hash_table_destroy(cs->ip_id_set);
|
||||
|
|
|
@ -70,7 +70,7 @@ reset_ct_table_data(conversations_table *ct)
|
|||
{
|
||||
char *display_name;
|
||||
char title[256];
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
const char *filter;
|
||||
GtkListStore *store;
|
||||
|
||||
|
@ -82,8 +82,8 @@ reset_ct_table_data(conversations_table *ct)
|
|||
|
||||
error_string = set_tap_dfilter (&ct->hash, filter);
|
||||
if (error_string) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1925,7 +1925,7 @@ init_ct_table_page(conversations_table *conversations, GtkWidget *vbox, gboolean
|
|||
tap_packet_cb packet_func)
|
||||
{
|
||||
int i;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
char title[256];
|
||||
|
||||
GtkListStore *store;
|
||||
|
@ -2059,8 +2059,8 @@ init_ct_table_page(conversations_table *conversations, GtkWidget *vbox, gboolean
|
|||
error_string=register_tap_listener(tap_name, &conversations->hash, filter, 0, reset_ct_table_data_cb, packet_func,
|
||||
draw_ct_table_data_cb);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ gtk_dcerpcstat_init(const char *opt_arg, void* userdata _U_)
|
|||
int pos = 0;
|
||||
const char *filter = NULL;
|
||||
dcerpcstat_tap_data_t* tap_data;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
/*
|
||||
* XXX - DCE RPC statistics are maintained only by major version,
|
||||
|
@ -260,8 +260,8 @@ gtk_dcerpcstat_init(const char *opt_arg, void* userdata _U_)
|
|||
error_string = register_tap_listener("dcerpc", &rs->data, filter, 0, dcerpcstat_reset, get_srt_packet_func(rs->srt), dcerpcstat_draw);
|
||||
if(error_string){
|
||||
/* error, we failed to attach to the tap. clean up */
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
free_srt_table(rs->srt, rs->data.srt_array, NULL, NULL);
|
||||
g_free(rs);
|
||||
return;
|
||||
|
|
|
@ -143,7 +143,7 @@ expert_comp_select_filter_cb(GtkWidget *widget, gpointer callback_data, guint ca
|
|||
{
|
||||
expert_comp_dlg_t *ss = (expert_comp_dlg_t *)callback_data;
|
||||
const char *filter;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
ss->use_dfilter = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget));
|
||||
if (ss->use_dfilter) {
|
||||
|
@ -153,14 +153,14 @@ expert_comp_select_filter_cb(GtkWidget *widget, gpointer callback_data, guint ca
|
|||
}
|
||||
error_string = set_tap_dfilter (ss, filter);
|
||||
if (error_string) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
error_string = set_tap_dfilter (ss->etd, filter);
|
||||
if (error_string) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -791,7 +791,7 @@ static void
|
|||
expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
|
||||
{
|
||||
expert_comp_dlg_t *ss;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
GtkWidget *temp_page, *details_page, *comments_page;
|
||||
GtkWidget *main_nb;
|
||||
GtkWidget *vbox;
|
||||
|
@ -950,8 +950,8 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
|
|||
expert_dlg_packet,
|
||||
expert_dlg_draw);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
g_free(ss->etd);
|
||||
return;
|
||||
}
|
||||
|
@ -964,8 +964,8 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_)
|
|||
error_string=register_tap_listener("expert", ss, NULL,
|
||||
TL_REQUIRES_NOTHING, error_reset, error_packet, expert_comp_draw);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
g_free(ss);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -322,7 +322,7 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_
|
|||
GtkTreeViewColumn *column;
|
||||
GtkTreeSelection *selection;
|
||||
GtkWidget *vbox, *bbox, *help_bt, *cancel_bt, *save_bt, *save_all_bt;
|
||||
gchar *error_msg;
|
||||
GString *error_msg;
|
||||
export_object_list_t *object_list;
|
||||
gchar *window_title;
|
||||
|
||||
|
@ -340,8 +340,8 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_
|
|||
|
||||
if (error_msg) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"Can't register %s tap: %s\n", name, error_msg);
|
||||
wmem_free(NULL, error_msg);
|
||||
"Can't register %s tap: %s\n", name, error_msg->str);
|
||||
g_string_free(error_msg, TRUE);
|
||||
g_free(object_list);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ static void follow_stream_cb(register_follow_t* follower, follow_read_stream_fun
|
|||
gchar *both_directions_string = NULL;
|
||||
follow_info_t *follow_info;
|
||||
gtk_follow_info_t *gtk_follow_info;
|
||||
gchar *msg;
|
||||
GString *msg;
|
||||
gboolean is_follow = FALSE;
|
||||
guint32 ignore_stream;
|
||||
char stream_window_title[256];
|
||||
|
@ -232,12 +232,11 @@ static void follow_stream_cb(register_follow_t* follower, follow_read_stream_fun
|
|||
if (msg) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"Can't register %s tap: %s\n",
|
||||
get_follow_tap_string(follower), msg);
|
||||
get_follow_tap_string(follower), msg->str);
|
||||
g_free(gtk_follow_info);
|
||||
g_free(follow_info->filter_out_filter);
|
||||
g_free(follow_info);
|
||||
g_free(follow_filter);
|
||||
wmem_free(NULL, msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -396,7 +396,7 @@ gsm_map_summary_packet(
|
|||
void
|
||||
register_tap_listener_gtk_gsm_map_summary(void)
|
||||
{
|
||||
gchar *err_p;
|
||||
GString *err_p;
|
||||
|
||||
memset((void *) &gsm_map_stat, 0, sizeof(gsm_map_stat_t));
|
||||
|
||||
|
@ -408,8 +408,8 @@ register_tap_listener_gtk_gsm_map_summary(void)
|
|||
|
||||
if (err_p != NULL)
|
||||
{
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p);
|
||||
wmem_free(NULL, err_p);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p->str);
|
||||
g_string_free(err_p, TRUE);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ reset_host_table_data(hostlist_table *hosts)
|
|||
{
|
||||
char *display_name;
|
||||
char title[256];
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
const char *filter;
|
||||
GtkListStore *store;
|
||||
|
||||
|
@ -86,8 +86,8 @@ reset_host_table_data(hostlist_table *hosts)
|
|||
}
|
||||
error_string = set_tap_dfilter (&hosts->hash, filter);
|
||||
if (error_string) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -850,7 +850,7 @@ init_hostlist_table_page(hostlist_table *hosttable, GtkWidget *vbox, gboolean hi
|
|||
const char *filter, tap_packet_cb packet_func)
|
||||
{
|
||||
guint i;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
char title[256];
|
||||
GtkListStore *store;
|
||||
GtkWidget *tree;
|
||||
|
@ -1009,8 +1009,8 @@ init_hostlist_table_page(hostlist_table *hosttable, GtkWidget *vbox, gboolean hi
|
|||
/* register the tap and rerun the taps on the packet list */
|
||||
error_string=register_tap_listener(tap_name, &hosttable->hash, filter, 0, reset_hostlist_table_data_cb, packet_func, draw_hostlist_table_data_cb);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
g_free(hosttable);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -1864,7 +1864,7 @@ static void
|
|||
on_refresh_bt_clicked(GtkWidget *bt _U_, gpointer data)
|
||||
{
|
||||
user_data_t *user_data = (user_data_t *)data;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
/* remove tap listener */
|
||||
remove_tap_listener(user_data);
|
||||
|
@ -1873,8 +1873,8 @@ on_refresh_bt_clicked(GtkWidget *bt _U_, gpointer data)
|
|||
error_string = register_tap_listener("IAX2", user_data, NULL, 0,
|
||||
iax2_reset, iax2_packet, iax2_draw);
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1068,11 +1068,11 @@ tap_iostat_draw(void *g)
|
|||
be able to pick up the field values after the edt tree has been
|
||||
pruned
|
||||
*/
|
||||
static gchar *
|
||||
static GString *
|
||||
enable_graph(io_stat_graph_t *gio, const char *filter, const char *field)
|
||||
{
|
||||
GString *real_filter = NULL;
|
||||
gchar *err_msg;
|
||||
GString *err_msg;
|
||||
|
||||
gio->display = TRUE;
|
||||
|
||||
|
@ -1155,7 +1155,7 @@ iostat_init(const char *opt_arg _U_, void* userdata _U_)
|
|||
{1.0, 0.314, 1.0, 1.0} /* Light brilliant magenta */
|
||||
};
|
||||
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
io = g_new(io_stat_t,1);
|
||||
io->needs_redraw = TRUE;
|
||||
|
|
|
@ -738,7 +738,7 @@ static void lbmc_stream_dlg_tap_draw(void * tap_data _U_)
|
|||
/**************************************************************/
|
||||
void lbmc_stream_dlg_stream_menu_cb(gpointer arg _U_)
|
||||
{
|
||||
gchar * err_msg;
|
||||
GString * err_msg;
|
||||
|
||||
if (global_stream_dialog_info != NULL)
|
||||
{
|
||||
|
@ -755,8 +755,8 @@ void lbmc_stream_dlg_stream_menu_cb(gpointer arg _U_)
|
|||
lbmc_stream_dlg_tap_draw);
|
||||
if (err_msg != NULL)
|
||||
{
|
||||
fprintf(stderr, "register_tap_listener: %s\n", err_msg);
|
||||
wmem_free(NULL, err_msg);
|
||||
fprintf(stderr, "register_tap_listener: %s\n", err_msg->str);
|
||||
g_string_free(err_msg, TRUE);
|
||||
}
|
||||
cf_retap_packets(&cfile);
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ static void lbmc_uim_flow_graph_on_ok_cb(GtkButton * button _U_, gpointer user_d
|
|||
/* Scan for displayed packets (retap all packets) */
|
||||
if (dialog_data.have_tap_listener == FALSE)
|
||||
{
|
||||
gchar * err_msg;
|
||||
GString * err_msg;
|
||||
|
||||
err_msg = register_tap_listener("lbm_uim",
|
||||
&(dialog_data.tap_identifier),
|
||||
|
@ -252,8 +252,8 @@ static void lbmc_uim_flow_graph_on_ok_cb(GtkButton * button _U_, gpointer user_d
|
|||
lbmc_uim_flow_tap_draw);
|
||||
if (err_msg != NULL)
|
||||
{
|
||||
fprintf(stderr, "register_tap_listener: %s\n", err_msg);
|
||||
wmem_free(NULL, err_msg);
|
||||
fprintf(stderr, "register_tap_listener: %s\n", err_msg->str);
|
||||
g_string_free(err_msg, TRUE);
|
||||
}
|
||||
dialog_data.have_tap_listener = TRUE;
|
||||
}
|
||||
|
|
|
@ -1003,7 +1003,7 @@ static void gtk_mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
mac_lte_stat_t *hs;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
GtkWidget *ues_scrolled_window;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *top_level_vbox;
|
||||
|
@ -1366,8 +1366,8 @@ static void gtk_mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
|
|||
mac_lte_stat_packet,
|
||||
mac_lte_stat_draw);
|
||||
if (error_string) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
g_free(hs);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -2296,9 +2296,14 @@ main(int argc, char *argv[])
|
|||
|
||||
#ifdef HAVE_PLUGINS
|
||||
/* Register all the plugin types we have. */
|
||||
epan_register_plugin_types(); /* Types known to libwireshark */
|
||||
wtap_register_plugin_types(); /* Types known to libwiretap */
|
||||
codec_register_plugin_types(); /* Types known to libwscodecs */
|
||||
|
||||
/* Scan for plugins. This does *not* call their registration routines;
|
||||
that's done later. */
|
||||
scan_plugins();
|
||||
|
||||
/* Register all libwiretap plugin modules. */
|
||||
register_all_wiretap_modules();
|
||||
|
||||
|
|
|
@ -530,7 +530,7 @@ mtp3_summary_packet(
|
|||
void
|
||||
register_tap_listener_gtk_mtp3_summary(void)
|
||||
{
|
||||
gchar *err_p;
|
||||
GString *err_p;
|
||||
|
||||
memset((void *) &mtp3_stat, 0, sizeof(mtp3_stat));
|
||||
|
||||
|
@ -542,8 +542,8 @@ register_tap_listener_gtk_mtp3_summary(void)
|
|||
|
||||
if (err_p != NULL)
|
||||
{
|
||||
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, "%s", err_p);
|
||||
wmem_free(NULL, err_p);
|
||||
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, "%s", err_p->str);
|
||||
g_string_free(err_p, TRUE);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -275,7 +275,7 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter)
|
|||
{
|
||||
rtd_t *rr;
|
||||
gchar *str;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
|
||||
|
@ -304,8 +304,8 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter)
|
|||
|
||||
error_string = register_tap_listener(get_rtd_tap_listener_name(rtd), &rr->data, filter, 0, rtd_reset, get_rtd_packet_func(rtd), rtd_draw);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
free_rtd_table(&rr->data.stat_table, NULL, NULL);
|
||||
g_free(rr);
|
||||
return;
|
||||
|
|
|
@ -1257,7 +1257,7 @@ static void gtk_rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
|
|||
{
|
||||
rlc_lte_stat_t *hs;
|
||||
const char *filter = NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
GtkWidget *ues_scrolled_window;
|
||||
GtkWidget *channels_scrolled_window;
|
||||
GtkWidget *bbox;
|
||||
|
@ -1615,8 +1615,8 @@ static void gtk_rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
|
|||
rlc_lte_stat_packet,
|
||||
rlc_lte_stat_draw);
|
||||
if (error_string) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
g_free(hs);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ gtk_rpcstat_init(const char *opt_arg, void* userdata _U_)
|
|||
GtkWidget *close_bt;
|
||||
int program, version, pos;
|
||||
const char *filter=NULL;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
rpcstat_tap_data_t* tap_data;
|
||||
|
||||
pos=0;
|
||||
|
@ -263,8 +263,8 @@ gtk_rpcstat_init(const char *opt_arg, void* userdata _U_)
|
|||
|
||||
error_string=register_tap_listener("rpc", &rs->data, filter, 0, rpcstat_reset, get_srt_packet_func(rs->srt), rpcstat_draw);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
free_srt_table(rs->srt, rs->data.srt_array, NULL, NULL);
|
||||
g_free(rs);
|
||||
return;
|
||||
|
|
|
@ -2038,7 +2038,7 @@ static void draw_stat(user_data_t *user_data);
|
|||
static void
|
||||
on_refresh_bt_clicked(GtkWidget *bt _U_, user_data_t *user_data)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
/* remove tap listener */
|
||||
remove_tap_listener(user_data);
|
||||
|
@ -2047,8 +2047,8 @@ on_refresh_bt_clicked(GtkWidget *bt _U_, user_data_t *user_data)
|
|||
error_string = register_tap_listener("rtp", user_data, NULL, 0,
|
||||
rtp_reset, rtp_packet, rtp_draw);
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ static void
|
|||
sctpstat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
sctpstat_t *hs;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
|
||||
|
@ -296,8 +296,8 @@ sctpstat_init(const char *opt_arg, void *userdata _U_)
|
|||
sctpstat_packet,
|
||||
sctpstat_draw);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
g_free(hs->filter);
|
||||
g_free(hs);
|
||||
return;
|
||||
|
|
|
@ -699,7 +699,7 @@ init_srt_tables(register_srt_t* srt, const char *filter)
|
|||
gchar *str;
|
||||
GtkWidget *label;
|
||||
char *filter_string, *tmp_filter_string;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
|
||||
|
@ -762,8 +762,8 @@ init_srt_tables(register_srt_t* srt, const char *filter)
|
|||
|
||||
error_string = register_tap_listener(get_srt_tap_listener_name(srt), &ss->data, filter, 0, srt_reset, get_srt_packet_func(srt), srt_draw);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
free_srt_table(ss->srt, ss->data.srt_array, NULL, NULL);
|
||||
g_free(ss);
|
||||
return;
|
||||
|
|
|
@ -196,7 +196,7 @@ static void
|
|||
init_simple_stat_tables(stat_tap_table_ui *new_stat_tap, const char *filter)
|
||||
{
|
||||
simple_stat_t *ss;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
|
||||
|
@ -221,8 +221,8 @@ init_simple_stat_tables(stat_tap_table_ui *new_stat_tap, const char *filter)
|
|||
|
||||
error_string = register_tap_listener(new_stat_tap->tap_name, &ss->data, filter, 0, simple_stat_reset, new_stat_tap->packet_func, simple_stat_draw);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
free_stat_tables(ss->new_stat_tap, NULL, NULL);
|
||||
g_free(ss);
|
||||
return;
|
||||
|
|
|
@ -399,7 +399,7 @@ init_gtk_tree(const char* opt_arg, void *userdata _U_)
|
|||
tree_pres* pr = (tree_pres *)g_malloc(sizeof(tree_pres));
|
||||
gchar* title = NULL;
|
||||
gchar* window_name = NULL;
|
||||
gchar* error_string;
|
||||
GString* error_string;
|
||||
GtkWidget *scr_win;
|
||||
size_t init_strlen;
|
||||
GtkWidget *main_vb, *bbox, *bt_close, *bt_copy, *bt_saveas;
|
||||
|
@ -510,8 +510,8 @@ init_gtk_tree(const char* opt_arg, void *userdata _U_)
|
|||
if (error_string) {
|
||||
/* error, we failed to attach to the tap. clean up */
|
||||
/* destroy_stat_tree_window(st); */
|
||||
report_failure("stats_tree for: %s failed to attach to the tap: %s",cfg->name,error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
report_failure("stats_tree for: %s failed to attach to the tap: %s",cfg->name,error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
|
||||
/* Button row. */
|
||||
|
|
|
@ -158,7 +158,7 @@ wlanstat_reset (void *phs)
|
|||
wlan_ep_t *list = wlan_stat->ep_list;
|
||||
char *display_name;
|
||||
char title[256];
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
GtkListStore *store;
|
||||
const char *filter = NULL;
|
||||
|
||||
|
@ -176,8 +176,8 @@ wlanstat_reset (void *phs)
|
|||
|
||||
error_string = set_tap_dfilter (wlan_stat, filter);
|
||||
if (error_string) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1745,7 +1745,7 @@ static void
|
|||
wlanstat_dlg_create (void)
|
||||
{
|
||||
wlanstat_t *hs;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
GtkWidget *scrolled_window;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *vbox;
|
||||
|
@ -1918,8 +1918,8 @@ wlanstat_dlg_create (void)
|
|||
wlanstat_reset, wlanstat_packet,
|
||||
wlanstat_draw);
|
||||
if (error_string) {
|
||||
simple_dialog (ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog (ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free (error_string, TRUE);
|
||||
g_free (hs);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ mcaststream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
|
||||
/* increment the packets counter for this stream and calculate average pps */
|
||||
++(strinfo->npackets);
|
||||
|
||||
|
||||
if (deltatime > 0) {
|
||||
strinfo->apackets = strinfo->npackets / deltatime;
|
||||
strinfo->average_bw = ((double)(strinfo->total_bytes*8) / deltatime);
|
||||
|
@ -332,7 +332,7 @@ remove_tap_listener_mcast_stream(mcaststream_tapinfo_t *tapinfo)
|
|||
void
|
||||
register_tap_listener_mcast_stream(mcaststream_tapinfo_t *tapinfo)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (!tapinfo) {
|
||||
return;
|
||||
|
@ -345,8 +345,8 @@ register_tap_listener_mcast_stream(mcaststream_tapinfo_t *tapinfo)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ bluetooth_device_tap_reset(void *tapinfo_ptr)
|
|||
static void
|
||||
bluetooth_devices_tap(void *data)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("bluetooth.device", data, NULL,
|
||||
0,
|
||||
|
@ -107,8 +107,8 @@ bluetooth_devices_tap(void *data)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
g_free(error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ bluetooth_device_tap_reset(void *tapinfo_ptr)
|
|||
static void
|
||||
bluetooth_devices_tap(void *data)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("bluetooth.hci_summary", data, NULL,
|
||||
0,
|
||||
|
@ -90,8 +90,8 @@ bluetooth_devices_tap(void *data)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -312,11 +312,11 @@ void ExpertInfoDialog::retapPackets()
|
|||
}
|
||||
|
||||
if (ui->limitCheckBox->isChecked()) {
|
||||
gchar *error_string = set_tap_dfilter(this, display_filter_.toUtf8().constData());
|
||||
GString *error_string = set_tap_dfilter(this, display_filter_.toUtf8().constData());
|
||||
if (error_string) {
|
||||
QMessageBox::warning(this, tr("Endpoint expert failed to set filter"),
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -371,7 +371,7 @@ gsm_map_summary_packet(void *tapdata, packet_info *, epan_dissect_t *, const voi
|
|||
void
|
||||
register_tap_listener_qt_gsm_map_summary(void)
|
||||
{
|
||||
gchar *err_p;
|
||||
GString *err_p;
|
||||
|
||||
memset((void *) &gsm_map_stat, 0, sizeof(gsm_map_stat_t));
|
||||
|
||||
|
@ -383,8 +383,8 @@ register_tap_listener_qt_gsm_map_summary(void)
|
|||
|
||||
if (err_p != NULL)
|
||||
{
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p);
|
||||
wmem_free(NULL, err_p);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p->str);
|
||||
g_string_free(err_p, TRUE);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -1650,7 +1650,7 @@ IOGraph::IOGraph(QCustomPlot *parent) :
|
|||
graph_ = parent_->addGraph(parent_->xAxis, parent_->yAxis);
|
||||
Q_ASSERT(graph_ != NULL);
|
||||
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
error_string = register_tap_listener("frame",
|
||||
this,
|
||||
"",
|
||||
|
@ -1661,7 +1661,7 @@ IOGraph::IOGraph(QCustomPlot *parent) :
|
|||
if (error_string) {
|
||||
// QMessageBox::critical(this, tr("%1 failed to register tap listener").arg(name_),
|
||||
// error_string->str);
|
||||
wmem_free(NULL, error_string);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
|
||||
setFilter(QString());
|
||||
|
@ -1682,7 +1682,6 @@ IOGraph::~IOGraph() {
|
|||
void IOGraph::setFilter(const QString &filter)
|
||||
{
|
||||
GString *error_string;
|
||||
gchar* filter_error_string;
|
||||
QString full_filter(filter.trimmed());
|
||||
|
||||
config_err_.clear();
|
||||
|
@ -1720,10 +1719,10 @@ void IOGraph::setFilter(const QString &filter)
|
|||
}
|
||||
}
|
||||
|
||||
filter_error_string = set_tap_dfilter(this, full_filter.toUtf8().constData());
|
||||
if (filter_error_string) {
|
||||
config_err_ = filter_error_string;
|
||||
wmem_free(NULL, filter_error_string);
|
||||
error_string = set_tap_dfilter(this, full_filter.toUtf8().constData());
|
||||
if (error_string) {
|
||||
config_err_ = error_string->str;
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
} else {
|
||||
if (filter_.compare(filter) && visible_) {
|
||||
|
|
|
@ -1295,7 +1295,7 @@ void LBMLBTRMTransportDialog::resetReceiversDetail(void)
|
|||
|
||||
void LBMLBTRMTransportDialog::fillTree(void)
|
||||
{
|
||||
gchar * error_string;
|
||||
GString * error_string;
|
||||
|
||||
if (m_capture_file == NULL)
|
||||
{
|
||||
|
@ -1313,8 +1313,8 @@ void LBMLBTRMTransportDialog::fillTree(void)
|
|||
if (error_string)
|
||||
{
|
||||
QMessageBox::critical(this, tr("LBT-RM Statistics failed to attach to tap"),
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
reject();
|
||||
}
|
||||
|
||||
|
|
|
@ -1715,7 +1715,7 @@ void LBMLBTRUTransportDialog::resetReceiversDetail(void)
|
|||
|
||||
void LBMLBTRUTransportDialog::fillTree(void)
|
||||
{
|
||||
gchar * error_string;
|
||||
GString * error_string;
|
||||
|
||||
if (m_capture_file == NULL)
|
||||
{
|
||||
|
@ -1733,8 +1733,8 @@ void LBMLBTRUTransportDialog::fillTree(void)
|
|||
if (error_string)
|
||||
{
|
||||
QMessageBox::critical(this, tr("LBT-RU Statistics failed to attach to tap"),
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
reject();
|
||||
}
|
||||
|
||||
|
|
|
@ -372,7 +372,7 @@ void LBMStreamDialog::setCaptureFile(capture_file * cfile)
|
|||
|
||||
void LBMStreamDialog::fillTree(void)
|
||||
{
|
||||
gchar * error_string;
|
||||
GString * error_string;
|
||||
|
||||
if (m_capture_file == NULL)
|
||||
{
|
||||
|
@ -390,8 +390,8 @@ void LBMStreamDialog::fillTree(void)
|
|||
if (error_string)
|
||||
{
|
||||
QMessageBox::critical(this, tr("LBM Stream failed to attach to tap"),
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
reject();
|
||||
}
|
||||
|
||||
|
|
|
@ -371,7 +371,7 @@ mtp3_summary_packet(
|
|||
void
|
||||
register_tap_listener_qt_mtp3_summary(void)
|
||||
{
|
||||
gchar *err_p;
|
||||
GString *err_p;
|
||||
|
||||
memset((void *) &mtp3_stat, 0, sizeof(mtp3_stat));
|
||||
|
||||
|
@ -383,8 +383,8 @@ register_tap_listener_qt_mtp3_summary(void)
|
|||
|
||||
if (err_p != NULL)
|
||||
{
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p);
|
||||
wmem_free(NULL, err_p);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_p->str);
|
||||
g_string_free(err_p, TRUE);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -116,12 +116,12 @@ void WiresharkDialog::updateWidgets()
|
|||
|
||||
bool WiresharkDialog::registerTapListener(const char *tap_name, void *tap_data, const char *filter, guint flags, void(*tap_reset)(void *), gboolean(*tap_packet)(void *, struct _packet_info *, struct epan_dissect *, const void *), void(*tap_draw)(void *))
|
||||
{
|
||||
gchar *error_string = register_tap_listener(tap_name, tap_data, filter, flags,
|
||||
GString *error_string = register_tap_listener(tap_name, tap_data, filter, flags,
|
||||
tap_reset, tap_packet, tap_draw);
|
||||
if (error_string) {
|
||||
QMessageBox::warning(this, tr("Failed to attach to tap \"%1\"").arg(tap_name),
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ remove_tap_listener_rtp_stream(rtpstream_tapinfo_t *tapinfo)
|
|||
void
|
||||
register_tap_listener_rtp_stream(rtpstream_tapinfo_t *tapinfo, const char *fstring)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (!tapinfo) {
|
||||
return;
|
||||
|
@ -206,8 +206,8 @@ register_tap_listener_rtp_stream(rtpstream_tapinfo_t *tapinfo, const char *fstri
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf,
|
|||
epan_dissect_t edt;
|
||||
dfilter_t *sfcode;
|
||||
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
nstime_t rel_ts;
|
||||
/* Initialised to no known channels */
|
||||
th_t th = {0, {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
|
||||
|
@ -139,8 +139,8 @@ rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf,
|
|||
error_string = register_tap_listener("rlc-lte", &th, NULL, 0, NULL, tap_lte_rlc_packet, NULL);
|
||||
if (error_string){
|
||||
fprintf(stderr, "wireshark: Couldn't register rlc_lte_graph tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1); /* XXX: fix this */
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ gboolean rlc_graph_segment_list_get(capture_file *cf, struct rlc_graph *g, gbool
|
|||
char **err_string)
|
||||
{
|
||||
struct rlc_segment current;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
g_log(NULL, G_LOG_LEVEL_DEBUG, "graph_segment_list_get()");
|
||||
|
||||
|
@ -283,8 +283,8 @@ gboolean rlc_graph_segment_list_get(capture_file *cf, struct rlc_graph *g, gbool
|
|||
error_string = register_tap_listener("rlc-lte", g, "rlc-lte", 0, NULL, rlc_lte_tap_for_graph_data, NULL);
|
||||
if (error_string) {
|
||||
fprintf(stderr, "wireshark: Couldn't register rlc_graph tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1); /* XXX: fix this */
|
||||
}
|
||||
cf_retap_packets(cf);
|
||||
|
|
|
@ -1239,13 +1239,13 @@ sctp_stat_get_info(void)
|
|||
void
|
||||
register_tap_listener_sctp_stat(void)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (!sctp_tapinfo_struct.is_registered)
|
||||
{
|
||||
if ((error_string = register_tap_listener("sctp", &sctp_tapinfo_struct, NULL, 0, reset, packet, NULL))) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
return;
|
||||
}
|
||||
sctp_tapinfo_struct.is_registered=TRUE;
|
||||
|
|
|
@ -116,7 +116,7 @@ void
|
|||
graph_segment_list_get(capture_file *cf, struct tcp_graph *tg, gboolean stream_known)
|
||||
{
|
||||
struct segment current;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
tcp_scan_t ts;
|
||||
|
||||
g_log(NULL, G_LOG_LEVEL_DEBUG, "graph_segment_list_get()");
|
||||
|
@ -152,8 +152,8 @@ graph_segment_list_get(capture_file *cf, struct tcp_graph *tg, gboolean stream_k
|
|||
error_string = register_tap_listener("tcp", &ts, "tcp", 0, NULL, tapall_tcpip_packet, NULL);
|
||||
if (error_string) {
|
||||
fprintf(stderr, "wireshark: Couldn't register tcp_graph tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1); /* XXX: fix this */
|
||||
}
|
||||
cf_retap_packets(cf);
|
||||
|
@ -288,7 +288,7 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs)
|
|||
epan_dissect_t edt;
|
||||
dfilter_t *sfcode;
|
||||
gchar *err_msg;
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
nstime_t rel_ts;
|
||||
th_t th = {0, {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
|
||||
|
||||
|
@ -312,8 +312,8 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs)
|
|||
error_string=register_tap_listener("tcp", &th, NULL, 0, NULL, tap_tcpip_packet, NULL);
|
||||
if (error_string) {
|
||||
fprintf(stderr, "wireshark: Couldn't register tcp_graph tap: %s\n",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -177,11 +177,13 @@ exp_pdu_close(exp_pdu_t *exp_pdu_tap_data)
|
|||
char *
|
||||
exp_pdu_pre_open(const char *tap_name, const char *filter, exp_pdu_t *exp_pdu_tap_data)
|
||||
{
|
||||
GString *error_string;
|
||||
|
||||
/* XXX: can we always assume WTAP_ENCAP_WIRESHARK_UPPER_PDU? */
|
||||
exp_pdu_tap_data->pkt_encap = wtap_wtap_encap_to_pcap_encap(WTAP_ENCAP_WIRESHARK_UPPER_PDU);
|
||||
|
||||
/* Register this tap listener now */
|
||||
return register_tap_listener(tap_name, /* The name of the tap we want to listen to */
|
||||
error_string = register_tap_listener(tap_name, /* The name of the tap we want to listen to */
|
||||
exp_pdu_tap_data, /* instance identifier/pointer to a struct holding
|
||||
* all state variables */
|
||||
filter, /* pointer to a filter string */
|
||||
|
@ -189,6 +191,10 @@ exp_pdu_pre_open(const char *tap_name, const char *filter, exp_pdu_t *exp_pdu_ta
|
|||
NULL,
|
||||
export_pdu_packet,
|
||||
NULL);
|
||||
if (error_string != NULL)
|
||||
return g_string_free(error_string, FALSE);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
120
ui/voip_calls.c
120
ui/voip_calls.c
|
@ -532,7 +532,7 @@ rtp_event_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt _
|
|||
void
|
||||
rtp_event_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("rtpevent", tap_base_to_id(tap_id_base, tap_id_offset_rtp_event_),
|
||||
NULL,
|
||||
|
@ -544,8 +544,8 @@ rtp_event_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -840,7 +840,7 @@ rtp_packet_draw(void *tap_offset_ptr)
|
|||
void
|
||||
rtp_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("rtp", tap_base_to_id(tap_id_base, tap_id_offset_rtp_), NULL,
|
||||
0,
|
||||
|
@ -850,8 +850,8 @@ rtp_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
);
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1036,7 +1036,7 @@ t38_draw(void *tap_offset_ptr)
|
|||
void
|
||||
t38_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("t38", tap_base_to_id(tap_id_base, tap_id_offset_t38_), NULL,
|
||||
0,
|
||||
|
@ -1046,8 +1046,8 @@ t38_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
);
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1267,7 +1267,7 @@ sip_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
sip_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("sip", tap_base_to_id(tap_id_base, tap_id_offset_sip_), NULL,
|
||||
0,
|
||||
|
@ -1277,8 +1277,8 @@ sip_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
);
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1470,7 +1470,7 @@ isup_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
isup_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("isup", tap_base_to_id(tap_id_base, tap_id_offset_isup_),
|
||||
NULL,
|
||||
|
@ -1482,8 +1482,8 @@ isup_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1523,7 +1523,7 @@ mtp3_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt
|
|||
void
|
||||
mtp3_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("mtp3", tap_base_to_id(tap_id_base, tap_id_offset_mtp3_),
|
||||
NULL,
|
||||
|
@ -1535,8 +1535,8 @@ mtp3_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
|
||||
error_string = register_tap_listener("m3ua", tap_base_to_id(tap_id_base, tap_id_offset_m3ua_),
|
||||
|
@ -1549,8 +1549,8 @@ mtp3_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1851,7 +1851,7 @@ q931_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
q931_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("q931", tap_base_to_id(tap_id_base, tap_id_offset_q931_),
|
||||
NULL,
|
||||
|
@ -1863,8 +1863,8 @@ q931_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2144,7 +2144,7 @@ h225_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
h225_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("h225", tap_base_to_id(tap_id_base, tap_id_offset_h225_), NULL,
|
||||
0,
|
||||
|
@ -2155,8 +2155,8 @@ h225_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2304,7 +2304,7 @@ h245dg_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
h245dg_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
if (!tap_id_base->h245_labels) {
|
||||
tap_id_base->h245_labels = g_new0(h245_labels_t, 1);
|
||||
|
@ -2319,8 +2319,8 @@ h245dg_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2378,7 +2378,7 @@ sdp_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
sdp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("sdp", tap_base_to_id(tap_id_base, tap_id_offset_sdp_), NULL,
|
||||
0,
|
||||
|
@ -2389,8 +2389,8 @@ sdp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2752,7 +2752,7 @@ mgcp_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
mgcp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
/*
|
||||
* We set TL_REQUIRES_PROTO_TREE to force a non-null "tree"
|
||||
|
@ -2770,8 +2770,8 @@ mgcp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
);
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2885,7 +2885,7 @@ actrace_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
actrace_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("actrace", tap_base_to_id(tap_id_base, tap_id_offset_actrace_), NULL,
|
||||
0,
|
||||
|
@ -2896,8 +2896,8 @@ actrace_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3056,7 +3056,7 @@ megaco_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
h248_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("megaco", tap_base_to_id(tap_id_base, tap_id_offset_megaco_),
|
||||
NULL,
|
||||
|
@ -3067,8 +3067,8 @@ h248_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
|
||||
error_string = register_tap_listener("h248", tap_base_to_id(tap_id_base, tap_id_offset_h248_),
|
||||
|
@ -3080,8 +3080,8 @@ h248_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3249,7 +3249,7 @@ sua_calls_draw(void *tap_offset_ptr)
|
|||
|
||||
void sccp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("sccp", tap_base_to_id(tap_id_base, tap_id_offset_sccp_),
|
||||
NULL,
|
||||
|
@ -3260,8 +3260,8 @@ void sccp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
|
||||
error_string = register_tap_listener("sua", tap_base_to_id(tap_id_base, tap_id_offset_sua_),
|
||||
|
@ -3273,8 +3273,8 @@ void sccp_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3772,7 +3772,7 @@ unistim_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
unistim_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) {
|
||||
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("unistim", tap_base_to_id(tap_id_base, tap_id_offset_unistim_),
|
||||
NULL,
|
||||
|
@ -3784,8 +3784,8 @@ unistim_calls_init_tap(voip_calls_tapinfo_t *tap_id_base) {
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3933,7 +3933,7 @@ skinny_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
skinny_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
/*
|
||||
* We set TL_REQUIRES_PROTO_TREE to force a non-null "tree"
|
||||
|
@ -3951,8 +3951,8 @@ skinny_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
);
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4072,7 +4072,7 @@ iax2_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
iax2_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
/*
|
||||
* We set TL_REQUIRES_PROTO_TREE to force a non-null "tree"
|
||||
|
@ -4093,8 +4093,8 @@ iax2_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
);
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s",
|
||||
error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4195,7 +4195,7 @@ voip_calls_draw(void *tap_offset_ptr)
|
|||
void
|
||||
voip_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
||||
{
|
||||
gchar *error_string;
|
||||
GString *error_string;
|
||||
|
||||
error_string = register_tap_listener("voip", tap_base_to_id(tap_id_base, tap_id_offset_voip_),
|
||||
NULL,
|
||||
|
@ -4207,8 +4207,8 @@ voip_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
|
|||
|
||||
if (error_string != NULL) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"%s", error_string);
|
||||
wmem_free(NULL, error_string);
|
||||
"%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -540,16 +540,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
init_open_routines();
|
||||
|
||||
/* Register all dissectors; we must do this before checking for the
|
||||
"-G" flag, as the "-G" flag dumps information registered by the
|
||||
dissectors, and we must do it before we read the preferences, in
|
||||
case any dissectors register preferences. */
|
||||
if (!epan_init(register_all_protocols,register_all_protocol_handoffs,
|
||||
splash_update, NULL)) {
|
||||
SimpleDialog::displayQueuedMessages(main_w);
|
||||
return 2;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
/* Register all the plugin types we have. */
|
||||
epan_register_plugin_types(); /* Types known to libwireshark */
|
||||
|
@ -567,6 +557,16 @@ int main(int argc, char *argv[])
|
|||
register_all_codecs();
|
||||
#endif
|
||||
|
||||
/* Register all dissectors; we must do this before checking for the
|
||||
"-G" flag, as the "-G" flag dumps information registered by the
|
||||
dissectors, and we must do it before we read the preferences, in
|
||||
case any dissectors register preferences. */
|
||||
if (!epan_init(register_all_protocols,register_all_protocol_handoffs,
|
||||
splash_update, NULL)) {
|
||||
SimpleDialog::displayQueuedMessages(main_w);
|
||||
return 2;
|
||||
}
|
||||
|
||||
splash_update(RA_LISTENERS, NULL, NULL);
|
||||
|
||||
/* Register all tap listeners; we do this before we parse the arguments,
|
||||
|
|
Loading…
Reference in New Issue