From Peter Fuller: free pref_str in set_link_type() if preferences aren't set. From me: call get_credential_inf() at startup.

svn path=/trunk/; revision=24656
This commit is contained in:
Jeff Morriss 2008-03-16 15:29:13 +00:00
parent 2693fce57b
commit 70a53138b3
1 changed files with 12 additions and 5 deletions

View File

@ -399,12 +399,14 @@ set_link_type(const char *lt_arg) {
if (dhandle) {
encap = WTAP_ENCAP_USER0;
pref_str = g_string_new("uat:user_dlts:");
/* This must match the format used in the user_dlts file */
g_string_sprintfa(pref_str,
"\"User 0 (DLT=147)\",\"%s\",\"0\",\"\",\"0\",\"\"", spec_ptr);
/* This must match the format used in the user_dlts file */
g_string_sprintfa(pref_str,
"\"User 0 (DLT=147)\",\"%s\",\"0\",\"\",\"0\",\"\"",
spec_ptr);
if (prefs_set_pref(pref_str->str) != PREFS_SET_OK) {
return FALSE;
}
g_string_free(pref_str, TRUE);
return FALSE;
}
g_string_free(pref_str, TRUE);
return TRUE;
}
@ -443,6 +445,11 @@ main(int argc, char *argv[])
static const char optstring[] = OPTSTRING_INIT;
/*
* Get credential information for later use.
*/
get_credential_info();
/*
* Clear the filters arrays
*/