aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/alert_box.c4
-rw-r--r--ui/capture.c2
-rw-r--r--ui/capture_ui_utils.c4
-rw-r--r--ui/cli/tap-diameter-avp.c2
-rw-r--r--ui/commandline.c2
-rw-r--r--ui/export_pdu_ui_utils.c2
-rw-r--r--ui/failure_message.c6
-rw-r--r--ui/filter_files.c2
-rw-r--r--ui/iface_lists.c14
-rw-r--r--ui/profile.c14
-rw-r--r--ui/qt/capture_options_dialog.cpp4
-rw-r--r--ui/qt/io_graph_dialog.cpp10
-rw-r--r--ui/qt/main.cpp2
-rw-r--r--ui/qt/manage_interfaces_dialog.cpp10
-rw-r--r--ui/qt/simple_dialog.cpp2
-rw-r--r--ui/qt/wireshark_application.cpp2
-rw-r--r--ui/rtp_stream.h2
-rw-r--r--ui/traffic_table_ui.c6
-rw-r--r--ui/version_info.c2
-rw-r--r--ui/voip_calls.c168
-rw-r--r--ui/voip_calls.h2
-rw-r--r--ui/win32/file_dlg_win32.cpp4
22 files changed, 133 insertions, 133 deletions
diff --git a/ui/alert_box.c b/ui/alert_box.c
index 0089e7105a..b96f5a1213 100644
--- a/ui/alert_box.c
+++ b/ui/alert_box.c
@@ -270,7 +270,7 @@ cfile_read_failure_alert_box(const char *filename, int err, gchar *err_info)
gchar *display_basename;
display_basename = g_filename_display_basename(filename);
- display_name = g_strdup_printf("capture file \"%s\"", display_basename);
+ display_name = ws_strdup_printf("capture file \"%s\"", display_basename);
g_free(display_basename);
}
@@ -360,7 +360,7 @@ cfile_write_failure_alert_box(const char *in_filename, const char *out_filename,
if (in_filename == NULL)
in_file_string = g_strdup("");
else
- in_file_string = g_strdup_printf(" of file \"%s\"", in_filename);
+ in_file_string = ws_strdup_printf(" of file \"%s\"", in_filename);
switch (err) {
diff --git a/ui/capture.c b/ui/capture.c
index d627925847..75a93325bd 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -440,7 +440,7 @@ capture_input_new_file(capture_session *cap_session, gchar *new_file)
cap_session->wtap = wtap_open_offline(new_file, WTAP_TYPE_AUTO, &err, &err_info, FALSE);
if (!cap_session->wtap) {
- err_msg = g_strdup_printf(cf_open_error_message(err, err_info),
+ err_msg = ws_strdup_printf(cf_open_error_message(err, err_info),
new_file);
ws_warning("capture_input_new_file: %d (%s)", err, err_msg);
g_free(err_msg);
diff --git a/ui/capture_ui_utils.c b/ui/capture_ui_utils.c
index 00d0e5133b..358fc891f6 100644
--- a/ui/capture_ui_utils.c
+++ b/ui/capture_ui_utils.c
@@ -336,14 +336,14 @@ build_capture_combo_list(GList *if_list, gboolean do_hide)
descr = capture_dev_user_descr_find(if_info->name);
if (descr != NULL) {
/* Yes, we have a user-supplied description; use it. */
- if_string = g_strdup_printf("%s: %s", descr, if_info->name);
+ if_string = ws_strdup_printf("%s: %s", descr, if_info->name);
g_free(descr);
} else {
/* No, we don't have a user-supplied description; did we get
one from the OS or libpcap? */
if (if_info->vendor_description != NULL) {
/* Yes - use it. */
- if_string = g_strdup_printf("%s: %s",
+ if_string = ws_strdup_printf("%s: %s",
if_info->vendor_description,
if_info->name);
} else {
diff --git a/ui/cli/tap-diameter-avp.c b/ui/cli/tap-diameter-avp.c
index 73062269ff..74d738b934 100644
--- a/ui/cli/tap-diameter-avp.c
+++ b/ui/cli/tap-diameter-avp.c
@@ -103,7 +103,7 @@ diam_tree_to_csv(proto_node *node, gpointer data)
val_str = g_strdup(val_tmp);
wmem_free(NULL, val_tmp);
} else
- val_str = g_strdup_printf("unsupported type: %s", ftype_name(ftype));
+ val_str = ws_strdup_printf("unsupported type: %s", ftype_name(ftype));
/*printf("traverse: name='%s', abbrev='%s',desc='%s', val='%s'\n", hfi->name, hfi->abbrev, ftype_name(hfi->type), val_str);*/
printf("%s='%s' ", hfi->name, val_str);
diff --git a/ui/commandline.c b/ui/commandline.c
index 7ec8fa40e3..be8f787c13 100644
--- a/ui/commandline.c
+++ b/ui/commandline.c
@@ -718,7 +718,7 @@ void commandline_options_drop(const char *module_name, const char *pref_name) {
if (global_commandline_info.user_opts == NULL) return;
- opt_prefix = g_strdup_printf("%s.%s:", module_name, pref_name);
+ opt_prefix = ws_strdup_printf("%s.%s:", module_name, pref_name);
while (NULL != (elem = g_slist_find_custom(global_commandline_info.user_opts,
(gconstpointer)opt_prefix, cl_find_custom))) {
diff --git a/ui/export_pdu_ui_utils.c b/ui/export_pdu_ui_utils.c
index 53e43bbba2..72188f78fe 100644
--- a/ui/export_pdu_ui_utils.c
+++ b/ui/export_pdu_ui_utils.c
@@ -61,7 +61,7 @@ do_export_pdu(const char *filter, const gchar *tap_name)
/* Write a pcapng file... */
file_type_subtype = wtap_pcapng_file_type_subtype();
/* ...with this comment */
- comment = g_strdup_printf("Dump of PDUs from %s", cfile.filename);
+ comment = ws_strdup_printf("Dump of PDUs from %s", cfile.filename);
status = exp_pdu_open(&exp_pdu_tap_data, capfile_name, file_type_subtype,
import_file_fd, comment, &err, &err_info);
g_free(comment);
diff --git a/ui/failure_message.c b/ui/failure_message.c
index 760e75124e..5c1d874c5a 100644
--- a/ui/failure_message.c
+++ b/ui/failure_message.c
@@ -79,7 +79,7 @@ input_file_description(const char *fname)
fstring = g_strdup("standard input");
} else {
/* We're reading from a file */
- fstring = g_strdup_printf("file \"%s\"", fname);
+ fstring = ws_strdup_printf("file \"%s\"", fname);
}
return fstring;
}
@@ -94,7 +94,7 @@ output_file_description(const char *fname)
fstring = g_strdup("standard output");
} else {
/* We're writing to a file */
- fstring = g_strdup_printf("file \"%s\"", fname);
+ fstring = ws_strdup_printf("file \"%s\"", fname);
}
return fstring;
}
@@ -371,7 +371,7 @@ cfile_write_failure_message(const char *in_filename, const char *out_filename,
in_frame_string = g_strdup("");
} else {
in_file_string = input_file_description(in_filename);
- in_frame_string = g_strdup_printf(" %u of %s", framenum,
+ in_frame_string = ws_strdup_printf(" %u of %s", framenum,
in_file_string);
g_free(in_file_string);
}
diff --git a/ui/filter_files.c b/ui/filter_files.c
index ed771fab61..df139951af 100644
--- a/ui/filter_files.c
+++ b/ui/filter_files.c
@@ -480,7 +480,7 @@ save_filter_list(filter_list_type_t list_type)
/* Write to "XXX.new", and rename if that succeeds.
That means we don't trash the file if we fail to write it out
completely. */
- ff_path_new = g_strdup_printf("%s.new", ff_path);
+ ff_path_new = ws_strdup_printf("%s.new", ff_path);
if ((ff = ws_fopen(ff_path_new, "w")) == NULL) {
/* We had an error saving the filter. */
diff --git a/ui/iface_lists.c b/ui/iface_lists.c
index 408a111ccb..78aec9ea81 100644
--- a/ui/iface_lists.c
+++ b/ui/iface_lists.c
@@ -76,14 +76,14 @@ get_iface_display_name(const gchar *description, const if_info_t *if_info)
* of the device GUID, and not at all friendly.
*/
gchar *if_string = if_info->friendly_name ? if_info->friendly_name : if_info->name;
- return g_strdup_printf("%s: %s", description, if_string);
+ return ws_strdup_printf("%s: %s", description, if_string);
#else
/*
* On UN*X, show the interface name; it's short and somewhat
* friendly, and many UN*X users are used to interface names,
* so we should show it.
*/
- return g_strdup_printf("%s: %s", description, if_info->name);
+ return ws_strdup_printf("%s: %s", description, if_info->name);
#endif
}
@@ -95,7 +95,7 @@ get_iface_display_name(const gchar *description, const if_info_t *if_info)
* don't show the name, as that's a string made out of
* the device GUID, and not at all friendly.
*/
- return g_strdup_printf("%s", if_info->friendly_name);
+ return ws_strdup_printf("%s", if_info->friendly_name);
#else
/*
* On UN*X, if we have a friendly name, show it along
@@ -103,13 +103,13 @@ get_iface_display_name(const gchar *description, const if_info_t *if_info)
* and somewhat friendly, and many UN*X users are used
* to interface names, so we should show it.
*/
- return g_strdup_printf("%s: %s", if_info->friendly_name, if_info->name);
+ return ws_strdup_printf("%s: %s", if_info->friendly_name, if_info->name);
#endif
}
if (if_info->vendor_description) {
/* We have a device description from libpcap. */
- return g_strdup_printf("%s: %s", if_info->vendor_description, if_info->name);
+ return ws_strdup_printf("%s: %s", if_info->vendor_description, if_info->name);
}
/* No additional descriptions found. */
@@ -296,7 +296,7 @@ scan_local_interfaces(void (*update_cb)(void))
link->name = g_strdup(data_link_info->description);
} else {
link->dlt = -1;
- link->name = g_strdup_printf("%s (not supported)", data_link_info->name);
+ link->name = ws_strdup_printf("%s (not supported)", data_link_info->name);
}
device.links = g_list_append(device.links, link);
linktype_count++;
@@ -380,7 +380,7 @@ scan_local_interfaces(void (*update_cb)(void))
device.name = g_strdup(interface_opts->name);
device.vendor_description = g_strdup(interface_opts->hardware);
device.display_name = interface_opts->descr ?
- g_strdup_printf("%s: %s", device.name, interface_opts->descr) :
+ ws_strdup_printf("%s: %s", device.name, interface_opts->descr) :
g_strdup(device.name);
device.hidden = FALSE;
device.selected = TRUE;
diff --git a/ui/profile.c b/ui/profile.c
index e75150e24e..853ec45c76 100644
--- a/ui/profile.c
+++ b/ui/profile.c
@@ -114,7 +114,7 @@ gchar *apply_profile_changes(void)
profile1 = (profile_def *) fl1->data;
g_strstrip(profile1->name);
if ((err_msg = profile_name_is_valid(profile1->name)) != NULL) {
- gchar *message = g_strdup_printf("%s\nProfiles unchanged.", err_msg);
+ gchar *message = ws_strdup_printf("%s\nProfiles unchanged.", err_msg);
g_free(err_msg);
return message;
}
@@ -131,7 +131,7 @@ gchar *apply_profile_changes(void)
g_strstrip(profile1->name);
if (profile1->status == PROF_STAT_COPY) {
if (create_persconffile_profile(profile1->name, &pf_dir_path) == -1) {
- err_msg = g_strdup_printf("Can't create directory\n\"%s\":\n%s.",
+ err_msg = ws_strdup_printf("Can't create directory\n\"%s\":\n%s.",
pf_dir_path, g_strerror(errno));
g_free(pf_dir_path);
@@ -328,7 +328,7 @@ init_profile_list(void)
if ((dir = ws_dir_open(profiles_dir, 0, NULL)) != NULL) {
while ((file = ws_dir_read_name(dir)) != NULL) {
name = ws_dir_get_name(file);
- filename = g_strdup_printf ("%s%s%s", profiles_dir, G_DIR_SEPARATOR_S, name);
+ filename = ws_strdup_printf ("%s%s%s", profiles_dir, G_DIR_SEPARATOR_S, name);
if (test_for_directory(filename) == EISDIR) {
local_profiles = g_list_prepend(local_profiles, g_strdup(name));
@@ -351,7 +351,7 @@ init_profile_list(void)
if ((dir = ws_dir_open(profiles_dir, 0, NULL)) != NULL) {
while ((file = ws_dir_read_name(dir)) != NULL) {
name = ws_dir_get_name(file);
- filename = g_strdup_printf ("%s%s%s", profiles_dir, G_DIR_SEPARATOR_S, name);
+ filename = ws_strdup_printf ("%s%s%s", profiles_dir, G_DIR_SEPARATOR_S, name);
if (test_for_directory(filename) == EISDIR) {
global_profiles = g_list_prepend(global_profiles, g_strdup(name));
@@ -395,18 +395,18 @@ profile_name_is_valid(const gchar *name)
invalid = TRUE;
}
if (invalid) {
- reason = g_strdup_printf("start or end with period (.), or contain any of the following characters:\n"
+ reason = ws_strdup_printf("start or end with period (.), or contain any of the following characters:\n"
" \\ / : * ? \" < > |");
}
#else
if (strchr(name, '/')) {
/* Invalid character in directory */
- reason = g_strdup_printf("contain the '/' character.");
+ reason = ws_strdup_printf("contain the '/' character.");
}
#endif
if (reason) {
- message = g_strdup_printf("A profile name cannot %s", reason);
+ message = ws_strdup_printf("A profile name cannot %s", reason);
g_free(reason);
return message;
}
diff --git a/ui/qt/capture_options_dialog.cpp b/ui/qt/capture_options_dialog.cpp
index 72b2ab0815..857ae2b16f 100644
--- a/ui/qt/capture_options_dialog.cpp
+++ b/ui/qt/capture_options_dialog.cpp
@@ -417,7 +417,7 @@ void CaptureOptionsDialog::interfaceItemChanged(QTreeWidgetItem *item, int colum
#ifdef HAVE_PCAP_REMOTE
if (device->remote_opts.remote_host_opts.auth_type == CAPTURE_AUTH_PWD) {
- auth_str = g_strdup_printf("%s:%s", device->remote_opts.remote_host_opts.auth_username,
+ auth_str = ws_strdup_printf("%s:%s", device->remote_opts.remote_host_opts.auth_username,
device->remote_opts.remote_host_opts.auth_password);
}
#endif
@@ -455,7 +455,7 @@ void CaptureOptionsDialog::interfaceItemChanged(QTreeWidgetItem *item, int colum
} else {
gchar *str;
/* XXX - should we just omit them? */
- str = g_strdup_printf("%s (not supported)", data_link_info->name);
+ str = ws_strdup_printf("%s (not supported)", data_link_info->name);
linkr->dlt = -1;
linkr->name = g_strdup(str);
g_free(str);
diff --git a/ui/qt/io_graph_dialog.cpp b/ui/qt/io_graph_dialog.cpp
index e64b37ce6e..d88f8bcc18 100644
--- a/ui/qt/io_graph_dialog.cpp
+++ b/ui/qt/io_graph_dialog.cpp
@@ -149,7 +149,7 @@ static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, g
((rec_t*)rec)->field_name = 0; \
g_free(tmp_str); } \
static void basename ## _ ## field_name ## _tostr_cb(void* rec, char** out_ptr, unsigned* out_len, const void* UNUSED_PARAMETER(u1), const void* UNUSED_PARAMETER(u2)) {\
- *out_ptr = g_strdup_printf("%s",((rec_t*)rec)->field_name ? "Enabled" : "Disabled"); \
+ *out_ptr = ws_strdup_printf("%s",((rec_t*)rec)->field_name ? "Enabled" : "Disabled"); \
*out_len = (unsigned)strlen(*out_ptr); }
static gboolean uat_fld_chk_enable(void* u1 _U_, const char* strptr, guint len, const void* u2 _U_, const void* u3 _U_, char** err)
@@ -166,7 +166,7 @@ static gboolean uat_fld_chk_enable(void* u1 _U_, const char* strptr, guint len,
}
//User should never see this unless they are manually modifying UAT
- *err = g_strdup_printf("invalid value: %s (must be Enabled or Disabled)", str);
+ *err = ws_strdup_printf("invalid value: %s (must be Enabled or Disabled)", str);
g_free(str);
return FALSE;
}
@@ -189,7 +189,7 @@ static void io_graph_sma_period_set_cb(void* rec, const char* buf, guint len, co
g_free(str);
str = g_strdup("None");
} else {
- char *str2 = g_strdup_printf("%s interval SMA", str);
+ char *str2 = ws_strdup_printf("%s interval SMA", str);
g_free(str);
str = str2;
}
@@ -231,7 +231,7 @@ static gboolean sma_period_chk_enum(void* u1 _U_, const char* strptr, guint len,
g_free(str);
str = g_strdup("None");
} else {
- char *str2 = g_strdup_printf("%s interval SMA", str);
+ char *str2 = ws_strdup_printf("%s interval SMA", str);
g_free(str);
str = str2;
}
@@ -245,7 +245,7 @@ static gboolean sma_period_chk_enum(void* u1 _U_, const char* strptr, guint len,
}
}
- *err = g_strdup_printf("invalid value: %s",str);
+ *err = ws_strdup_printf("invalid value: %s",str);
g_free(str);
return FALSE;
}
diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp
index a1e5b404f8..2f995cc18e 100644
--- a/ui/qt/main.cpp
+++ b/ui/qt/main.cpp
@@ -883,7 +883,7 @@ int main(int argc, char *qt_argv[])
interface_opts = &g_array_index(global_capture_opts.ifaces, interface_options, i);
#ifdef HAVE_PCAP_REMOTE
if (interface_opts->auth_type == CAPTURE_AUTH_PWD) {
- auth_str = g_strdup_printf("%s:%s", interface_opts->auth_username, interface_opts->auth_password);
+ auth_str = ws_strdup_printf("%s:%s", interface_opts->auth_username, interface_opts->auth_password);
}
#endif
caps = capture_get_if_capabilities(interface_opts->name, interface_opts->monitor_mode,
diff --git a/ui/qt/manage_interfaces_dialog.cpp b/ui/qt/manage_interfaces_dialog.cpp
index fb7d1e477d..ea1e762d79 100644
--- a/ui/qt/manage_interfaces_dialog.cpp
+++ b/ui/qt/manage_interfaces_dialog.cpp
@@ -365,21 +365,21 @@ void ManageInterfacesDialog::updateRemoteInterfaceList(GList* rlist, remote_opti
descr = capture_dev_user_descr_find(if_info->name);
if (descr != NULL) {
/* Yes, we have a user-supplied description; use it. */
- if_string = g_strdup_printf("%s: %s", descr, if_info->name);
+ if_string = ws_strdup_printf("%s: %s", descr, if_info->name);
g_free(descr);
} else {
/* No, we don't have a user-supplied description; did we get
one from the OS or libpcap? */
if (if_info->vendor_description != NULL) {
/* Yes - use it. */
- if_string = g_strdup_printf("%s: %s", if_info->vendor_description, if_info->name);
+ if_string = ws_strdup_printf("%s: %s", if_info->vendor_description, if_info->name);
} else {
/* No. */
if_string = g_strdup(if_info->name);
}
} /* else descr != NULL */
if (if_info->loopback) {
- device.display_name = g_strdup_printf("%s (loopback)", if_string);
+ device.display_name = ws_strdup_printf("%s (loopback)", if_string);
} else {
device.display_name = g_strdup(if_string);
}
@@ -400,7 +400,7 @@ void ManageInterfacesDialog::updateRemoteInterfaceList(GList* rlist, remote_opti
device.timestamp_type = g_strdup(global_capture_opts.default_options.timestamp_type);
monitor_mode = prefs_capture_device_monitor_mode(if_string);
if (roptions->remote_host_opts.auth_type == CAPTURE_AUTH_PWD) {
- auth_str = g_strdup_printf("%s:%s", roptions->remote_host_opts.auth_username,
+ auth_str = ws_strdup_printf("%s:%s", roptions->remote_host_opts.auth_username,
roptions->remote_host_opts.auth_password);
}
caps = capture_get_if_capabilities(if_string, monitor_mode, auth_str, NULL, NULL, main_window_update);
@@ -450,7 +450,7 @@ void ManageInterfacesDialog::updateRemoteInterfaceList(GList* rlist, remote_opti
linkr->name = g_strdup(data_link_info->description);
linkr->dlt = data_link_info->dlt;
} else {
- linkr->name = g_strdup_printf("%s (not supported)", data_link_info->name);
+ linkr->name = ws_strdup_printf("%s (not supported)", data_link_info->name);
linkr->dlt = -1;
}
if (linktype_count == 0) {
diff --git a/ui/qt/simple_dialog.cpp b/ui/qt/simple_dialog.cpp
index f686e37f50..952713deb1 100644
--- a/ui/qt/simple_dialog.cpp
+++ b/ui/qt/simple_dialog.cpp
@@ -205,7 +205,7 @@ SimpleDialog::SimpleDialog(QWidget *parent, ESD_TYPE_E type, int btn_mask, const
gchar *vmessage;
QString message;
- vmessage = g_strdup_vprintf(msg_format, ap);
+ vmessage = ws_strdup_vprintf(msg_format, ap);
#ifdef _WIN32
//
// On Windows, filename strings inside Wireshark are UTF-8 strings,
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp
index b8621939ad..842808da20 100644
--- a/ui/qt/wireshark_application.cpp
+++ b/ui/qt/wireshark_application.cpp
@@ -543,7 +543,7 @@ void WiresharkApplication::storeCustomColorsInRecent()
recent.custom_colors = NULL;
for (int i = 0; i < QColorDialog::customCount(); i++) {
QRgb rgb = QColorDialog::customColor(i).rgb();
- recent.custom_colors = g_list_append(recent.custom_colors, g_strdup_printf("%08x", rgb));
+ recent.custom_colors = g_list_append(recent.custom_colors, ws_strdup_printf("%08x", rgb));
}
}
}
diff --git a/ui/rtp_stream.h b/ui/rtp_stream.h
index be562a7044..5d7ab01d4e 100644
--- a/ui/rtp_stream.h
+++ b/ui/rtp_stream.h
@@ -106,7 +106,7 @@ struct _rtpstream_tapinfo {
#if 0
#define RTP_STREAM_DEBUG(...) { \
- char *RTP_STREAM_DEBUG_MSG = g_strdup_printf(__VA_ARGS__); \
+ char *RTP_STREAM_DEBUG_MSG = ws_strdup_printf(__VA_ARGS__); \
ws_warning("rtp_stream: %s:%d %s", G_STRFUNC, __LINE__, RTP_STREAM_DEBUG_MSG); \
g_free(RTP_STREAM_DEBUG_MSG); \
}
diff --git a/ui/traffic_table_ui.c b/ui/traffic_table_ui.c
index 10a76d87af..22fdd011e2 100644
--- a/ui/traffic_table_ui.c
+++ b/ui/traffic_table_ui.c
@@ -68,7 +68,7 @@ write_endpoint_geoip_map(FILE *fp, gboolean json_only, hostlist_talker_t *const
char *base_html_path = get_datafile_path("ipmap.html");
FILE *base_html_fp = ws_fopen(base_html_path, "rb");
if (!base_html_fp) {
- *err_str = g_strdup_printf("Could not open base file %s for reading: %s",
+ *err_str = ws_strdup_printf("Could not open base file %s for reading: %s",
base_html_path, g_strerror(errno));
g_free(base_html_path);
return FALSE;
@@ -80,13 +80,13 @@ write_endpoint_geoip_map(FILE *fp, gboolean json_only, hostlist_talker_t *const
char buf[4096];
while ((n = fread(buf, 1, sizeof(buf), base_html_fp)) != 0) {
if (fwrite(buf, 1, n, fp) != n) {
- *err_str = g_strdup_printf("Failed to write to map file: %s", g_strerror(errno));
+ *err_str = ws_strdup_printf("Failed to write to map file: %s", g_strerror(errno));
fclose(base_html_fp);
return FALSE;
}
}
if (ferror(base_html_fp)) {
- *err_str = g_strdup_printf("Failed to read base file: %s", g_strerror(errno));
+ *err_str = ws_strdup_printf("Failed to read base file: %s", g_strerror(errno));
fclose(base_html_fp);
return FALSE;
}
diff --git a/ui/version_info.c b/ui/version_info.c
index 56427e3f0f..079c4b85e1 100644
--- a/ui/version_info.c
+++ b/ui/version_info.c
@@ -60,7 +60,7 @@ ws_init_version_info(const char *appname,
* version - including the VCS version, for a build from
* a checkout.
*/
- appname_with_version = g_strdup_printf("%s %s",
+ appname_with_version = ws_strdup_printf("%s %s",
appname, get_ws_vcs_version_info());
/* Get the compile-time version information string */
diff --git a/ui/voip_calls.c b/ui/voip_calls.c
index dd3edb1a5a..bba062c0cf 100644
--- a/ui/voip_calls.c
+++ b/ui/voip_calls.c
@@ -381,12 +381,12 @@ static int append_to_frame_graph(voip_calls_tapinfo_t *tapinfo, guint32 frame_nu
comment = gai->comment;
if (new_frame_label != NULL) {
- gai->frame_label = g_strdup_printf("%s %s", frame_label, new_frame_label);
+ gai->frame_label = ws_strdup_printf("%s %s", frame_label, new_frame_label);
g_free(frame_label);
}
if (new_comment != NULL) {
- gai->comment = g_strdup_printf("%s %s", comment, new_comment);
+ gai->comment = ws_strdup_printf("%s %s", comment, new_comment);
g_free(comment);
}
}
@@ -743,7 +743,7 @@ rtp_draw(void *tap_offset_ptr)
}
if(gai != NULL) {
const char *comment_fmt_src = "%%s, %%u packets. Duration: %%.%dfs SSRC: 0x%%X";
- char *comment_fmt = g_strdup_printf(comment_fmt_src, prefs.gui_decimal_places1);
+ char *comment_fmt = ws_strdup_printf(comment_fmt_src, prefs.gui_decimal_places1);
/* Found the setup frame*/
conv_num = gai->conv_num;
/* if RTP was already in the Graph, just update the comment information */
@@ -751,7 +751,7 @@ rtp_draw(void *tap_offset_ptr)
if (gai != NULL) {
duration = (gdouble)(nstime_to_msec(&rtp_listinfo->stop_rel_time) - nstime_to_msec(&rtp_listinfo->start_rel_time));
g_free(gai->comment);
- gai->comment = g_strdup_printf(comment_fmt,
+ gai->comment = ws_strdup_printf(comment_fmt,
(rtp_listinfo->is_srtp)?"SRTP":"RTP", rtp_listinfo->packet_count,
duration/1000, rtp_listinfo->id.ssrc);
} else {
@@ -762,7 +762,7 @@ rtp_draw(void *tap_offset_ptr)
new_gai->port_src = rtp_listinfo->id.src_port;
new_gai->port_dst = rtp_listinfo->id.dst_port;
duration = (gdouble)(nstime_to_msec(&rtp_listinfo->stop_rel_time) - nstime_to_msec(&rtp_listinfo->start_rel_time));
- new_gai->frame_label = g_strdup_printf("%s (%s) %s%s%s",
+ new_gai->frame_label = ws_strdup_printf("%s (%s) %s%s%s",
(rtp_listinfo->is_srtp)?"SRTP":"RTP",
rtp_listinfo->first_payload_type_name,
(rtp_listinfo->rtp_event == -1)?
@@ -770,7 +770,7 @@ rtp_draw(void *tap_offset_ptr)
(rtp_listinfo->ed137_info!=NULL?" ":""),
(rtp_listinfo->ed137_info!=NULL?rtp_listinfo->ed137_info:"")
);
- new_gai->comment = g_strdup_printf(comment_fmt,
+ new_gai->comment = ws_strdup_printf(comment_fmt,
(rtp_listinfo->is_srtp)?"SRTP":"RTP", rtp_listinfo->packet_count,
duration/1000, rtp_listinfo->id.ssrc);
new_gai->info_type=GA_INFO_TYPE_RTP;
@@ -840,7 +840,7 @@ rtp_packet_draw(void *tap_offset_ptr)
if (rtp_listinfo->start_fd->num == gai->frame_number) {
duration = (guint32)(nstime_to_msec(&rtp_listinfo->stop_fd->rel_ts) - nstime_to_msec(&rtp_listinfo->start_fd->rel_ts));
g_free(gai->comment);
- gai->comment = g_strdup_printf("%s Num packets:%u Duration:%u.%03us SSRC:0x%X",
+ gai->comment = ws_strdup_printf("%s Num packets:%u Duration:%u.%03us SSRC:0x%X",
(rtp_listinfo->is_srtp)?"SRTP":"RTP", rtp_listinfo->npackets,
duration/1000,(duration%1000), rtp_listinfo->id.ssrc);
break;
@@ -860,12 +860,12 @@ rtp_packet_draw(void *tap_offset_ptr)
new_gai->port_dst = rtp_listinfo->id.dst_port;
new_gai->protocol = g_strdup(port_type_to_str(pinfo->ptype));
duration = (guint32)(nstime_to_msec(&rtp_listinfo->stop_fd->rel_ts) - nstime_to_msec(&rtp_listinfo->start_fd->rel_ts));
- new_gai->frame_label = g_strdup_printf("%s (%s) %s",
+ new_gai->frame_label = ws_strdup_printf("%s (%s) %s",
(rtp_listinfo->is_srtp)?"SRTP":"RTP",
rtp_listinfo->first_payload_type_str,
(rtp_listinfo->rtp_event == -1)?
"":val_to_str_ext_const(rtp_listinfo->rtp_event, &rtp_event_type_values_ext, "Unknown RTP Event"));
- new_gai->comment = g_strdup_printf("%s Num packets:%u Duration:%u.%03us SSRC:0x%X",
+ new_gai->comment = ws_strdup_printf("%s Num packets:%u Duration:%u.%03us SSRC:0x%X",
(rtp_listinfo->is_srtp)?"SRTP":"RTP", rtp_listinfo->npackets,
duration/1000,(duration%1000), rtp_listinfo->id.ssrc);
new_gai->conv_num = conv_num;
@@ -1014,7 +1014,7 @@ t38_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const
if (t38_info->type_msg == 0) { /* 0=t30-indicator */
tmp_str1 = val_to_str_wmem(NULL, t38_info->t30ind_value, t38_T30_indicator_vals, "Ukn (0x%02X)");
frame_label = g_strdup(tmp_str1);
- comment = g_strdup_printf("t38:t30 Ind:%s", tmp_str1);
+ comment = ws_strdup_printf("t38:t30 Ind:%s", tmp_str1);
wmem_free(NULL, tmp_str1);
line_style = 1;
} else if (t38_info->type_msg == 1) { /* 1=data */
@@ -1026,7 +1026,7 @@ t38_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const
tmp_str1 = val_to_str_ext_wmem(NULL, t38_info->t30_Facsimile_Control & 0x7F,
&t30_facsimile_control_field_vals_short_ext,
"Ukn (0x%02X)");
- frame_label = g_strdup_printf("%s %s",
+ frame_label = ws_strdup_printf("%s %s",
tmp_str1,
t38_info->desc);
wmem_free(NULL, tmp_str1);
@@ -1037,7 +1037,7 @@ t38_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const
tmp_str2 = val_to_str_wmem(NULL, t38_info->data_value,
t38_T30_data_vals,
"Ukn (0x%02X)");
- comment = g_strdup_printf("t38:%s:HDLC:%s", tmp_str2, tmp_str1);
+ comment = ws_strdup_printf("t38:%s:HDLC:%s", tmp_str2, tmp_str1);
wmem_free(NULL, tmp_str1);
wmem_free(NULL, tmp_str2);
break;
@@ -1045,7 +1045,7 @@ t38_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const
case 5: /* hdlc-fcs-BAD-sig-end */
frame_label = g_strdup(t38_info->Data_Field_field_type_value == 3 ? "fcs-BAD" : "fcs-BAD-sig-end");
tmp_str1 = val_to_str_wmem(NULL, t38_info->data_value, t38_T30_data_vals, "Ukn (0x%02X)");
- comment = g_strdup_printf("WARNING: received t38:%s:HDLC:%s",
+ comment = ws_strdup_printf("WARNING: received t38:%s:HDLC:%s",
tmp_str1,
t38_info->Data_Field_field_type_value == 3 ? "fcs-BAD" : "fcs-BAD-sig-end");
wmem_free(NULL, tmp_str1);
@@ -1053,10 +1053,10 @@ t38_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const
case 7: /* t4-non-ecm-sig-end */
duration = nstime_to_sec(&pinfo->rel_ts) - t38_info->time_first_t4_data;
tmp_str1 = val_to_str_wmem(NULL, t38_info->data_value, t38_T30_data_vals, "Ukn (0x%02X)");
- frame_label = g_strdup_printf("t4-non-ecm-data:%s", tmp_str1);
+ frame_label = ws_strdup_printf("t4-non-ecm-data:%s", tmp_str1);
const char *comment_fmt_src = "t38:t4-non-ecm-data:%%s Duration: %%.%dfs %%s";
- char *comment_fmt = g_strdup_printf(comment_fmt_src, prefs.gui_decimal_places1);
- comment = g_strdup_printf(comment_fmt,
+ char *comment_fmt = ws_strdup_printf(comment_fmt_src, prefs.gui_decimal_places1);
+ comment = ws_strdup_printf(comment_fmt,
tmp_str1, duration, t38_info->desc_comment );
insert_to_graph_t38(tapinfo, pinfo, edt, frame_label, comment,
(guint16)conv_num, &(pinfo->src), &(pinfo->dst),
@@ -1222,8 +1222,8 @@ sip_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt ,
copy_address(&(tmp_dst), &(pinfo->dst));
if (pi->request_method == NULL) {
- frame_label = g_strdup_printf("%u %s", pi->response_code, pi->reason_phrase );
- comment = g_strdup_printf("SIP Status %u %s", pi->response_code, pi->reason_phrase );
+ frame_label = ws_strdup_printf("%u %s", pi->response_code, pi->reason_phrase );
+ comment = ws_strdup_printf("SIP Status %u %s", pi->response_code, pi->reason_phrase );
if ((tmp_sipinfo && pi->tap_cseq_number == tmp_sipinfo->invite_cseq)&&(addresses_equal(&tmp_dst,&(callsinfo->initial_speaker)))) {
if ((pi->response_code > 199) && (pi->response_code<300) && (tmp_sipinfo->sip_state == SIP_INVITE_SENT)) {
@@ -1239,7 +1239,7 @@ sip_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt ,
TODO: is useful but not perfect, what is appended is truncated when displayed in dialog window */
if (pi->response_code >= 200) {
old_comment = callsinfo->call_comment;
- callsinfo->call_comment=g_strdup_printf("%s %u",
+ callsinfo->call_comment=ws_strdup_printf("%s %u",
callsinfo->call_comment,
pi->response_code/*, pi->reason_phrase*/);
@@ -1256,7 +1256,7 @@ TODO: is useful but not perfect, what is appended is truncated when displayed in
tmp_sipinfo->invite_cseq = pi->tap_cseq_number;
callsinfo->call_state = VOIP_CALL_SETUP;
/* TODO: sometimes truncated when displayed in dialog window */
- comment = g_strdup_printf("SIP INVITE From: %s To:%s Call-ID:%s CSeq:%d",
+ comment = ws_strdup_printf("SIP INVITE From: %s To:%s Call-ID:%s CSeq:%d",
callsinfo->from_identity, callsinfo->to_identity,
callsinfo->call_id, pi->tap_cseq_number);
}
@@ -1264,21 +1264,21 @@ TODO: is useful but not perfect, what is appended is truncated when displayed in
&&(addresses_equal(&tmp_src,&(callsinfo->initial_speaker)))&&(tmp_sipinfo->sip_state==SIP_200_REC)
&&(callsinfo->call_state == VOIP_CALL_SETUP)) {
callsinfo->call_state = VOIP_IN_CALL;
- comment = g_strdup_printf("SIP Request INVITE ACK 200 CSeq:%d", pi->tap_cseq_number);
+ comment = ws_strdup_printf("SIP Request INVITE ACK 200 CSeq:%d", pi->tap_cseq_number);
}
else if (strcmp(pi->request_method,"BYE")==0) {
callsinfo->call_state = VOIP_COMPLETED;
tapinfo->completed_calls++;
- comment = g_strdup_printf("SIP Request BYE CSeq:%d", pi->tap_cseq_number);
+ comment = ws_strdup_printf("SIP Request BYE CSeq:%d", pi->tap_cseq_number);
}
else if ((strcmp(pi->request_method,"CANCEL")==0)&&(pi->tap_cseq_number == tmp_sipinfo->invite_cseq)
&&(addresses_equal(&tmp_src,&(callsinfo->initial_speaker)))&&(callsinfo->call_state==VOIP_CALL_SETUP)) {
callsinfo->call_state = VOIP_CANCELLED;
tmp_sipinfo->sip_state = SIP_CANCEL_SENT;
- comment = g_strdup_printf("SIP Request CANCEL CSeq:%d", pi->tap_cseq_number);
+ comment = ws_strdup_printf("SIP Request CANCEL CSeq:%d", pi->tap_cseq_number);
} else {
- /* comment = g_strdup_printf("SIP %s", pi->request_method); */
- comment = g_strdup_printf("SIP %s From: %s To:%s CSeq:%d",
+ /* comment = ws_strdup_printf("SIP %s", pi->request_method); */
+ comment = ws_strdup_printf("SIP %s From: %s To:%s CSeq:%d",
pi->request_method,
callsinfo->from_identity,
callsinfo->to_identity, pi->tap_cseq_number);
@@ -1461,16 +1461,16 @@ isup_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
if (callsinfo->npackets == 1) { /* this is the first packet, that must be an IAM */
if ((pi->calling_number!=NULL)&&(pi->called_number !=NULL)) {
- comment = g_strdup_printf("Call from %s to %s",
+ comment = ws_strdup_printf("Call from %s to %s",
pi->calling_number, pi->called_number);
}
} else if (callsinfo->npackets == 2) { /* in the second packet we show the SPs */
if (forward) {
- comment = g_strdup_printf("%i-%i -> %i-%i. Cic:%i",
+ comment = ws_strdup_printf("%i-%i -> %i-%i. Cic:%i",
tapinfo->mtp3_ni, tapinfo->mtp3_opc,
tapinfo->mtp3_ni, tapinfo->mtp3_dpc, pi->circuit_id);
} else {
- comment = g_strdup_printf("%i-%i -> %i-%i. Cic:%i",
+ comment = ws_strdup_printf("%i-%i -> %i-%i. Cic:%i",
tapinfo->mtp3_ni, tapinfo->mtp3_dpc,
tapinfo->mtp3_ni, tapinfo->mtp3_opc, pi->circuit_id);
}
@@ -1500,7 +1500,7 @@ isup_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
}
/* Overwrite any comment set above */
g_free(comment);
- comment = g_strdup_printf("Cause %i - %s",
+ comment = ws_strdup_printf("Cause %i - %s",
pi->cause_value,
val_to_str_ext_const(pi->cause_value, &q931_cause_code_vals_ext, "(Unknown)"));
break;
@@ -1782,12 +1782,12 @@ q931_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
list = g_list_next (list);
}
- comment = g_strdup_printf("H225 From: %s To:%s TunnH245:%s FS:%s", callsinfo->from_identity, callsinfo->to_identity, (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
+ comment = ws_strdup_printf("H225 From: %s To:%s TunnH245:%s FS:%s", callsinfo->from_identity, callsinfo->to_identity, (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
(tapinfo->h225_is_faststart==TRUE?"on":"off"));
} else if (tapinfo->h225_cstype == H225_RELEASE_COMPLET) {
/* get the Q931 Release cause code */
if (tapinfo->q931_cause_value != 0xFF) {
- comment = g_strdup_printf("H225 Q931 Rel Cause (%i):%s", tapinfo->q931_cause_value,
+ comment = ws_strdup_printf("H225 Q931 Rel Cause (%i):%s", tapinfo->q931_cause_value,
val_to_str_ext_const(tapinfo->q931_cause_value, &q931_cause_code_vals_ext, "<unknown>"));
} else { /* Cause not set */
comment = g_strdup("H225 No Q931 Rel Cause");
@@ -1885,7 +1885,7 @@ q931_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
switch(pi->message_type) {
case Q931_SETUP:
- comment = g_strdup_printf("AC_ISDN trunk:%u Calling: %s Called:%s", tapinfo->actrace_trunk, tapinfo->q931_calling_number, tapinfo->q931_called_number);
+ comment = ws_strdup_printf("AC_ISDN trunk:%u Calling: %s Called:%s", tapinfo->actrace_trunk, tapinfo->q931_calling_number, tapinfo->q931_called_number);
callsinfo->call_state=VOIP_CALL_SETUP;
break;
case Q931_CONNECT:
@@ -1907,7 +1907,7 @@ q931_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
tapinfo->completed_calls++;
}
if (tapinfo->q931_cause_value != 0xFF) {
- comment = g_strdup_printf("AC_ISDN trunk:%u Q931 Rel Cause (%i):%s", tapinfo->actrace_trunk, tapinfo->q931_cause_value,
+ comment = ws_strdup_printf("AC_ISDN trunk:%u Q931 Rel Cause (%i):%s", tapinfo->actrace_trunk, tapinfo->q931_cause_value,
val_to_str_ext_const(tapinfo->q931_cause_value, &q931_cause_code_vals_ext, "<unknown>"));
} else { /* Cause not set */
comment = g_strdup("AC_ISDN No Q931 Rel Cause");
@@ -1916,7 +1916,7 @@ q931_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
}
if (!comment)
- comment = g_strdup_printf("AC_ISDN trunk:%u", tapinfo->actrace_trunk );
+ comment = ws_strdup_printf("AC_ISDN trunk:%u", tapinfo->actrace_trunk );
tmp_str = val_to_str_wmem(NULL, pi->message_type, q931_message_type_vals, "<unknown (%d)>");
add_to_graph(tapinfo, pinfo, edt, tmp_str, comment, callsinfo->call_num,
@@ -2151,13 +2151,13 @@ h225_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
if (tmp_h323info->h225SetupAddr.type == AT_NONE)
copy_address(&(tmp_h323info->h225SetupAddr), &(pinfo->src));
callsinfo->call_state=VOIP_CALL_SETUP;
- comment = g_strdup_printf("H225 TunnH245:%s FS:%s", (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
+ comment = ws_strdup_printf("H225 TunnH245:%s FS:%s", (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
(pi->is_faststart==TRUE?"on":"off"));
break;
case H225_CONNECT:
callsinfo->call_state=VOIP_IN_CALL;
if (pi->is_faststart == TRUE) tmp_h323info->is_faststart_Proc = TRUE;
- comment = g_strdup_printf("H225 TunnH245:%s FS:%s", (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
+ comment = ws_strdup_printf("H225 TunnH245:%s FS:%s", (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
(pi->is_faststart==TRUE?"on":"off"));
break;
case H225_RELEASE_COMPLET:
@@ -2179,11 +2179,11 @@ h225_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
case H225_ALERTING:
case H225_CALL_PROCEDING:
if (pi->is_faststart == TRUE) tmp_h323info->is_faststart_Proc = TRUE;
- comment = g_strdup_printf("H225 TunnH245:%s FS:%s", (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
+ comment = ws_strdup_printf("H225 TunnH245:%s FS:%s", (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
(pi->is_faststart==TRUE?"on":"off"));
break;
default:
- comment = g_strdup_printf("H225 TunnH245:%s FS:%s", (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
+ comment = ws_strdup_printf("H225 TunnH245:%s FS:%s", (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
(pi->is_faststart==TRUE?"on":"off"));
}
@@ -2199,7 +2199,7 @@ h225_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
/* Fall Through */
case 19: /* LCF */
if (strlen(pi->dialedDigits))
- comment = g_strdup_printf("H225 RAS dialedDigits: %s", pi->dialedDigits);
+ comment = ws_strdup_printf("H225 RAS dialedDigits: %s", pi->dialedDigits);
else
comment = g_strdup("H225 RAS");
break;
@@ -2469,7 +2469,7 @@ sdp_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt _
g_free(tapinfo->sdp_summary);
tapinfo->sdp_frame_num = pinfo->num;
/* Append to graph the SDP summary if the packet exists */
- tapinfo->sdp_summary = g_strdup_printf("SDP (%s)", pi->summary_str);
+ tapinfo->sdp_summary = ws_strdup_printf("SDP (%s)", pi->summary_str);
append_to_frame_graph(tapinfo, pinfo->num, tapinfo->sdp_summary, NULL);
tapinfo->redraw |= REDRAW_SDP;
@@ -2769,7 +2769,7 @@ mgcp_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
{
case MGCP_REQUEST:
if ( (strcmp(pi->code, "NTFY") == 0) && (pi->observedEvents != NULL) ) {
- frame_label = g_strdup_printf("%s ObsEvt:%s",pi->code, pi->observedEvents);
+ frame_label = ws_strdup_printf("%s ObsEvt:%s",pi->code, pi->observedEvents);
if (tmp_mgcpinfo->fromEndpoint) {
/* use the Dialed digits to fill the "To" for the call, but use the first NTFY */
@@ -2805,9 +2805,9 @@ mgcp_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
}
if (pi->signalReq != NULL)
- frame_label = g_strdup_printf("%s%sSigReq:%s",pi->code, (pi->hasDigitMap == TRUE)?" DigitMap ":"", pi->signalReq);
+ frame_label = ws_strdup_printf("%s%sSigReq:%s",pi->code, (pi->hasDigitMap == TRUE)?" DigitMap ":"", pi->signalReq);
else
- frame_label = g_strdup_printf("%s%s",pi->code, (pi->hasDigitMap == TRUE)?" DigitMap ":"");
+ frame_label = ws_strdup_printf("%s%s",pi->code, (pi->hasDigitMap == TRUE)?" DigitMap ":"");
/* use the CallerID info to fill the "From" for the call */
if (!tmp_mgcpinfo->fromEndpoint) mgcp_caller_id(pi->signalReq, &(callsinfo->from_identity));
@@ -2827,14 +2827,14 @@ mgcp_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
if (frame_label == NULL) frame_label = g_strdup(pi->code);
break;
case MGCP_RESPONSE:
- frame_label = g_strdup_printf("%u (%s)",pi->rspcode, pi->code);
+ frame_label = ws_strdup_printf("%u (%s)",pi->rspcode, pi->code);
break;
case MGCP_OTHERS:
/* XXX what to do? */
break;
}
- comment = g_strdup_printf("MGCP %s %s%s", tmp_mgcpinfo->endpointId, (pi->mgcp_type == MGCP_REQUEST)?"Request":"Response", pi->is_duplicate?" Duplicate":"");
+ comment = ws_strdup_printf("MGCP %s %s%s", tmp_mgcpinfo->endpointId, (pi->mgcp_type == MGCP_REQUEST)?"Request":"Response", pi->is_duplicate?" Duplicate":"");
callsinfo->stop_fd = pinfo->fd;
callsinfo->stop_rel_ts = pinfo->rel_ts;
@@ -2982,7 +2982,7 @@ actrace_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
/* increment the packets counter of all calls */
++(tapinfo->npackets);
- comment = g_strdup_printf("AC_CAS trunk:%u", tapinfo->actrace_trunk);
+ comment = ws_strdup_printf("AC_CAS trunk:%u", tapinfo->actrace_trunk);
add_to_graph(tapinfo, pinfo, edt, pi->cas_frame_label, comment, callsinfo->call_num,
tapinfo->actrace_direction?&pstn_add:&(pinfo->src),
@@ -3093,7 +3093,7 @@ h248_calls_packet_common(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan
callsinfo = g_new0(voip_calls_info_t, 1);
callsinfo->call_state = VOIP_NO_STATE;
callsinfo->call_active_state = VOIP_ACTIVE;
- callsinfo->from_identity = g_strdup_printf("%s : %.8x", mgw_addr, cmd->ctx->id);
+ callsinfo->from_identity = ws_strdup_printf("%s : %.8x", mgw_addr, cmd->ctx->id);
callsinfo->to_identity = g_strdup("");
callsinfo->prot_info = cmd->ctx;
callsinfo->free_prot_info = NULL;
@@ -3116,7 +3116,7 @@ h248_calls_packet_common(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan
gcp_terms_t *ctx_term;
g_free(callsinfo->from_identity);
- callsinfo->from_identity = g_strdup_printf("%s : %.8x", mgw_addr, ((gcp_ctx_t*)callsinfo->prot_info)->id);
+ callsinfo->from_identity = ws_strdup_printf("%s : %.8x", mgw_addr, ((gcp_ctx_t*)callsinfo->prot_info)->id);
g_free(callsinfo->to_identity);
@@ -3521,7 +3521,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
callsinfo = g_new0(voip_calls_info_t, 1);
callsinfo->call_active_state = VOIP_ACTIVE;
callsinfo->call_state = VOIP_CALL_SETUP;
- callsinfo->from_identity=g_strdup_printf("%x",pi->termid);
+ callsinfo->from_identity=ws_strdup_printf("%x",pi->termid);
callsinfo->to_identity=g_strdup("UNKNOWN");
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
@@ -3587,11 +3587,11 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
/* Manipulate the data */
if(pi->key_val == 10) {
- tmp_unistim_info->key_buffer = g_strdup_printf("%s*",g_tmp->str);
+ tmp_unistim_info->key_buffer = ws_strdup_printf("%s*",g_tmp->str);
} else if(pi->key_val == 11) {
- tmp_unistim_info->key_buffer = g_strdup_printf("%s#",g_tmp->str);
+ tmp_unistim_info->key_buffer = ws_strdup_printf("%s#",g_tmp->str);
} else {
- tmp_unistim_info->key_buffer = g_strdup_printf("%s%d",g_tmp->str,pi->key_val);
+ tmp_unistim_info->key_buffer = ws_strdup_printf("%s%d",g_tmp->str,pi->key_val);
}
} else {
@@ -3602,28 +3602,28 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
} else if(pi->key_val == 11) {
tmp_unistim_info->key_buffer = g_strdup("#");
} else {
- tmp_unistim_info->key_buffer = g_strdup_printf("%d",pi->key_val);
+ tmp_unistim_info->key_buffer = ws_strdup_printf("%d",pi->key_val);
}
}
/* Select for non-digit characters */
if(pi->key_val == 10) {
- comment = g_strdup_printf("Key Input Sent: * (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: * (%d)", pi->sequence);
} else if(pi->key_val == 11) {
- comment = g_strdup_printf("Key Input Sent: # (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: # (%d)", pi->sequence);
} else {
- comment = g_strdup_printf("Key Input Sent: %d (%d)",pi->key_val, pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: %d (%d)",pi->key_val, pi->sequence);
}
} else if(pi->key_val == 12) {
/* Set label and comment for graph */
- comment = g_strdup_printf("Key Input Sent: UP (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: UP (%d)", pi->sequence);
} else if(pi->key_val == 13) {
/* Set label and comment for graph */
- comment = g_strdup_printf("Key Input Sent: DOWN (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: DOWN (%d)", pi->sequence);
} else if(pi->key_val == 14) {
/* Set label and comment for graph */
- comment = g_strdup_printf("Key Input Sent: RIGHT (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: RIGHT (%d)", pi->sequence);
} else if(pi->key_val == 15) {
if(pi->key_buffer != NULL) {
/* Get data */
@@ -3637,13 +3637,13 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
}
/* Set label and comment for graph */
- comment = g_strdup_printf("Key Input Sent: LEFT (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: LEFT (%d)", pi->sequence);
} else if(pi->key_val == 20) {
/* User pressed the soft key 0 probably dial */
- comment = g_strdup_printf("Key Input Sent: S0 (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: S0 (%d)", pi->sequence);
} else if(pi->key_val == 21) {
/* User pressed the soft key 1 */
- comment = g_strdup_printf("Key Input Sent: S1 (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: S1 (%d)", pi->sequence);
} else if(pi->key_val == 22) {
/* User pressed the soft key 2 */
/* On cs2k phones, soft key 2 is backspace. */
@@ -3660,10 +3660,10 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
}
/* add label and comment */
- comment = g_strdup_printf("Key Input Sent: S2 (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: S2 (%d)", pi->sequence);
} else if(pi->key_val == 28) {
/* User pressed something */
- comment = g_strdup_printf("Key Input Sent: Release (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: Release (%d)", pi->sequence);
} else if(pi->key_val == 23) {
/* User pressed the soft key 3 */
/* Cancel on cs2k so clear buffer */
@@ -3671,22 +3671,22 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
tmp_unistim_info->key_buffer = g_strdup("\n");
/* User pressed something, set labels*/
- comment = g_strdup_printf("Key Input Sent: S3 (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: S3 (%d)", pi->sequence);
} else if(pi->key_val == 27) {
/* User pressed something */
- comment = g_strdup_printf("Key Input Sent: Hold (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: Hold (%d)", pi->sequence);
} else if(pi->key_val == 29) {
/* User pressed something */
- comment = g_strdup_printf("Key Input Sent: Mute (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: Mute (%d)", pi->sequence);
} else if(pi->key_val == 30) {
/* User pressed something */
- comment = g_strdup_printf("Key Input Sent: Headset (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: Headset (%d)", pi->sequence);
} else if(pi->key_val == 31) {
/* Handsfree button */
- comment = g_strdup_printf("Key Input Sent: Handsfree (%d)", pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: Handsfree (%d)", pi->sequence);
} else if(pi->key_val >= 32 && pi->key_val <= 56) {
/* Prog. Key X */
- comment = g_strdup_printf("Key Input Sent: Prog%d (%d)", (pi->key_val & 31), pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: Prog%d (%d)", (pi->key_val & 31), pi->sequence);
}
if(pi->key_val != -1) {
@@ -3696,7 +3696,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
if (comment == NULL)
/* Ouch! What do you do!? */
/* User pressed something */
- comment = g_strdup_printf("Key Input Sent: UNKNOWN - %d (%d)", pi->key_val, pi->sequence);
+ comment = ws_strdup_printf("Key Input Sent: UNKNOWN - %d (%d)", pi->key_val, pi->sequence);
/* add to the graph */
add_to_graph(tapinfo, pinfo, edt, frame_label, comment, callsinfo->call_num, &(pinfo->src), &(pinfo->dst), 1);
@@ -3708,7 +3708,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
/* Phone is off hook */
frame_label = "OFF HOOK";
- comment = g_strdup_printf("Off Hook (%d)", pi->sequence);
+ comment = ws_strdup_printf("Off Hook (%d)", pi->sequence);
/* add to the graph */
add_to_graph(tapinfo, pinfo, edt, frame_label, comment, callsinfo->call_num, &(pinfo->src), &(pinfo->dst), 1);
@@ -3718,7 +3718,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
/* Phone is on hook */
frame_label = "ON HOOK";
- comment = g_strdup_printf("On Hook (%d)", pi->sequence);
+ comment = ws_strdup_printf("On Hook (%d)", pi->sequence);
/* add to the graph */
add_to_graph(tapinfo, pinfo, edt, frame_label, comment, callsinfo->call_num, &(pinfo->src), &(pinfo->dst), 1);
@@ -3750,7 +3750,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
Call control protocol, we can only guess at the destination by messing with
key buffers. */
if(tmp_unistim_info->key_buffer != NULL) {
- callsinfo->to_identity = g_strdup_printf("?? %s",tmp_unistim_info->key_buffer);
+ callsinfo->to_identity = ws_strdup_printf("?? %s",tmp_unistim_info->key_buffer);
}
/* change sequence number for ACK detection */
@@ -3762,7 +3762,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
/* Add graph data */
frame_label = "STREAM OPENED";
- comment = g_strdup_printf("Stream Opened (%d)",pi->sequence);
+ comment = ws_strdup_printf("Stream Opened (%d)",pi->sequence);
/* add to the graph */
add_to_graph(tapinfo, pinfo, edt, frame_label, comment, callsinfo->call_num, &(pinfo->src), &(pinfo->dst), 1);
@@ -3829,7 +3829,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
Call control protocol, we can only guess at the destination by messing with
key buffers. */
if(tmp_unistim_info->key_buffer != NULL) {
- callsinfo->to_identity = g_strdup_printf("?? %s",tmp_unistim_info->key_buffer);
+ callsinfo->to_identity = ws_strdup_printf("?? %s",tmp_unistim_info->key_buffer);
}
/* change sequence number for ACK detection */
@@ -3841,7 +3841,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
/* Add graph data */
frame_label = "STREAM OPENED";
- comment = g_strdup_printf("Stream Opened (%d)",pi->sequence);
+ comment = ws_strdup_printf("Stream Opened (%d)",pi->sequence);
/* add to the graph */
add_to_graph(tapinfo, pinfo, edt, frame_label, comment, callsinfo->call_num, &(pinfo->src), &(pinfo->dst), 1);
@@ -3865,7 +3865,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
}
frame_label = "STREAM CLOSED";
- comment = g_strdup_printf("Stream Closed (%d)",pi->sequence);
+ comment = ws_strdup_printf("Stream Closed (%d)",pi->sequence);
/* add to the graph */
add_to_graph(tapinfo, pinfo, edt, frame_label, comment, callsinfo->call_num, &(pinfo->src), &(pinfo->dst), 1);
@@ -3879,7 +3879,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
if(tmp_unistim_info->sequence == pi->sequence) {
frame_label = "ACK";
- comment = g_strdup_printf("ACK for sequence %d",pi->sequence);
+ comment = ws_strdup_printf("ACK for sequence %d",pi->sequence);
/* add to the graph */
add_to_graph(tapinfo, pinfo, edt, frame_label, comment, callsinfo->call_num, &(pinfo->src), &(pinfo->dst), 1);
@@ -3890,7 +3890,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
/* NAK */
frame_label = "NAK";
- comment = g_strdup_printf("NAK for sequence %d",pi->sequence);
+ comment = ws_strdup_printf("NAK for sequence %d",pi->sequence);
/* add to the graph */
add_to_graph(tapinfo, pinfo, edt, frame_label, comment, callsinfo->call_num, &(pinfo->src), &(pinfo->dst), 1);
@@ -4015,7 +4015,7 @@ skinny_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *ed
callsinfo = g_new0(voip_calls_info_t, 1);
callsinfo->call_state = VOIP_NO_STATE;
callsinfo->call_active_state = VOIP_ACTIVE;
- /* callsinfo->from_identity = g_strdup_printf("%s : %.8x", "Skinny", 1); */
+ /* callsinfo->from_identity = ws_strdup_printf("%s : %.8x", "Skinny", 1); */
callsinfo->from_identity = g_strdup("");
callsinfo->to_identity = g_strdup("");
callsinfo->prot_info = g_new(skinny_calls_info_t, 1);
@@ -4053,12 +4053,12 @@ skinny_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *ed
if (si->callId) {
if (si->passThroughPartyId)
- comment = g_strdup_printf("CallId = %u, PTId = %u", si->callId, si->passThroughPartyId);
+ comment = ws_strdup_printf("CallId = %u, PTId = %u", si->callId, si->passThroughPartyId);
else
- comment = g_strdup_printf("CallId = %u, LineId = %u", si->callId, si->lineId);
+ comment = ws_strdup_printf("CallId = %u, LineId = %u", si->callId, si->lineId);
} else {
if (si->passThroughPartyId)
- comment = g_strdup_printf("PTId = %u", si->passThroughPartyId);
+ comment = ws_strdup_printf("PTId = %u", si->passThroughPartyId);
else
comment = NULL;
}
diff --git a/ui/voip_calls.h b/ui/voip_calls.h
index 79c709aabb..97f0824a8d 100644
--- a/ui/voip_calls.h
+++ b/ui/voip_calls.h
@@ -223,7 +223,7 @@ typedef struct _voip_calls_tapinfo {
#if 0
#define VOIP_CALLS_DEBUG(...) { \
- char *VOIP_CALLS_DEBUG_MSG = g_strdup_printf(__VA_ARGS__); \
+ char *VOIP_CALLS_DEBUG_MSG = ws_strdup_printf(__VA_ARGS__); \
ws_warning("voip_calls: %s:%d %s", G_STRFUNC, __LINE__, VOIP_CALLS_DEBUG_MSG); \
g_free(VOIP_CALLS_DEBUG_MSG); \
}
diff --git a/ui/win32/file_dlg_win32.cpp b/ui/win32/file_dlg_win32.cpp
index eda04a3ac6..e53287c5dc 100644
--- a/ui/win32/file_dlg_win32.cpp
+++ b/ui/win32/file_dlg_win32.cpp
@@ -1269,7 +1269,7 @@ save_as_file_hook_proc(HWND sf_hwnd, UINT msg, WPARAM w_param _U_, LPARAM l_para
file_name8 = utf_16to8(notify->lpOFN->lpstrFile);
if (files_identical(cf->filename, file_name8)) {
/* XXX: Is MessageBox the best way to pop up an error ? How to make text bold ? */
- gchar *str = g_strdup_printf(
+ gchar *str = ws_strdup_printf(
"Capture File \"%s\" identical to loaded file.\n\n"
"Please choose a different filename.",
file_name8);
@@ -1342,7 +1342,7 @@ export_specified_packets_file_hook_proc(HWND sf_hwnd, UINT msg, WPARAM w_param,
file_name8 = utf_16to8(notify->lpOFN->lpstrFile);
if (files_identical(cf->filename, file_name8)) {
/* XXX: Is MessageBox the best way to pop up an error ? How to make text bold ? */
- gchar *str = g_strdup_printf(
+ gchar *str = ws_strdup_printf(
"Capture File \"%s\" identical to loaded file.\n\n"
"Please choose a different filename.",
file_name8);