This patch adds support for configuration profiles, which can be used to
[obnox/wireshark/wip.git] / epan / prefs.c
index b070f0a65efa4e14864f67fe31e088010d4fa479..c9485885874891c3b7c95d3a2d16c48ddba16d35 100644 (file)
@@ -1221,6 +1221,13 @@ init_prefs(void) {
   prefs_initialized = TRUE;
 }
 
+/* Reset preferences */
+void
+prefs_reset(void)
+{
+  prefs_initialized = FALSE;
+  init_prefs();
+}
 
 /* Read the preferences file, fill in "prefs", and return a pointer to it.
 
@@ -1305,7 +1312,7 @@ read_prefs(int *gpf_errno_return, int *gpf_read_errno_return,
   }
 
   /* Construct the pathname of the user's preferences file. */
-  pf_path = get_persconffile_path(PF_NAME, FALSE);
+  pf_path = get_persconffile_path(PF_NAME, TRUE, FALSE);
 
   /* Read the user's preferences file, if it exists. */
   *pf_path_return = NULL;
@@ -2440,7 +2447,7 @@ write_prefs(char **pf_path_return)
    */
 
   if (pf_path_return != NULL) {
-    pf_path = get_persconffile_path(PF_NAME, TRUE);
+    pf_path = get_persconffile_path(PF_NAME, TRUE, TRUE);
     if ((pf = eth_fopen(pf_path, "w")) == NULL) {
       *pf_path_return = pf_path;
       return errno;