if (global_capture_opts.ifaces->len > 1) {
prefix = g_strdup_printf("wireshark_%d_interfaces", global_capture_opts.ifaces->len);
} else {
+ gchar *basename;
#ifdef _WIN32
GString *iface;
-
iface = isolate_uuid(g_array_index(global_capture_opts.ifaces, interface_options, 0).name);
- prefix = g_strconcat("wireshark_", g_basename(iface->str), NULL);
+ basename = g_path_get_basename(iface->str);
g_string_free(iface, TRUE);
#else
- prefix = g_strconcat("wireshark_", g_basename(g_array_index(global_capture_opts.ifaces, interface_options, 0).name), NULL);
+ basename = g_path_get_basename(g_array_index(global_capture_opts.ifaces, interface_options, 0).name);
#endif
+ prefix = g_strconcat("wireshark_", basename, NULL);
+ g_free(basename);
}
*save_file_fd = create_tempfile(&tmpname, prefix);
g_free(prefix);
/* XXX - The current key handling code in the GUI requires
* no separators and lower case */
dk->key = g_string_new(bytes_to_str(key_ba->data, key_ba->len));
- g_string_down(dk->key);
+ g_string_ascii_down(dk->key);
dk->bits = key_ba->len * 8;
dk->ssid = NULL;
a = g_hash_table_lookup(dict->attrs_by_name, current_attr);
if (! a) {
- g_string_sprintfa(error, "Attr: '%s', does not exist in %s:%i \n", current_attr, fullpaths[include_stack_ptr], linenums[include_stack_ptr]);
+ g_string_append_printf(error, "Attr: '%s', does not exist in %s:%i \n", current_attr, fullpaths[include_stack_ptr], linenums[include_stack_ptr]);
BEGIN JUNK;
return;
}
if (type == radius_tlv) {
- g_string_sprintfa(error, "sub-TLV: '%s', sub-TLV's type is specified as tlv in %s:%i \n", name, fullpaths[include_stack_ptr], linenums[include_stack_ptr]);
+ g_string_append_printf(error, "sub-TLV: '%s', sub-TLV's type is specified as tlv in %s:%i \n", name, fullpaths[include_stack_ptr], linenums[include_stack_ptr]);
BEGIN JUNK;
return;
}
if ( name ) {
gchar* loname_a = ep_strdup(name);
- g_strdown(loname_a);
+ g_ascii_strdown(loname_a, -1);
if ( proto_get_id_by_filter_name(loname_a) > 0 ) {
WSLUA_ARG_ERROR(Proto_new,NAME,"there cannot be two protocols with the same name");
} else {
gchar* loname = g_strdup(name);
gchar* hiname = g_strdup(name);
- g_strdown(loname);
- g_strup(hiname);
+ g_ascii_strdown(loname, -1);
+ g_ascii_strup(hiname, -1);
proto->name = hiname;
proto->desc = g_strdup(desc);
if (lua_isfunction(L,3)) {
/* insert the dissector into the dissectors table */
gchar* loname = ep_strdup(proto->name);
- g_strdown(loname);
+ g_ascii_strdown(loname, -1);
lua_rawgeti(L, LUA_REGISTRYINDEX, lua_dissectors_table_ref);
lua_replace(L, 1);
vec = g_strsplit(s,":",0);
for (i = 0; vec[i]; i++) {
- g_strdown(vec[i]);
+ g_ascii_strdown(vec[i]);
v = 0;
switch ( strlen(vec[i]) ) {