OSSP CVS Repository

ossp - Difference in ossp-pkg/rc/rc_config.c versions 1.27 and 1.28
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/rc/rc_config.c 1.27 -> 1.28

--- rc_config.c  2002/08/01 15:54:45     1.27
+++ rc_config.c  2003/05/26 08:36:40     1.28
@@ -29,12 +29,13 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <dirent.h>         /* For opendir(3) */
 
 #include "rc.h"
 #include "rc_config.h"
-#include "rc_const.h"               /* String constants                     */
+#include "rc_const.h"       /* String constants                     */
 
-static int m_nLocks = 0;            /* Server locks, not thread-safe FIXME  */
+static int m_nLocks = 0;    /* Server locks, not thread-safe FIXME  */
 
 
 /***************************************
@@ -294,6 +295,7 @@
 rc_return_t configDefaults(void)
 {
     ex_t Except;
+    DIR *pTmpdir = NULL; /* For detecting our temp dir with opendir(3) */
 
     try { /* Test members for empty attributes */
         if (!configGetval(RC_EVL_VAL) && !configGetval(RC_EXC_VAL) \
@@ -332,14 +334,12 @@
 
 /*        if (!configGetval(RC_QRY_VAL))*/
 
-/*
         if (!configGetval(RC_TMP_VAL)) {
-            If exists '/tmp'
-                clioptSetval(RC_TMP_VAL, "/tmp");
-            Else
-                RC_NOP;
+            pTmpdir = opendir(RC_DEF_TMP);
+            if (pTmpdir)
+                clioptSetval(RC_TMP_VAL, RC_DEF_TMP);
+            closedir(pTmpdir);
         }
-*/
 
 /*        if (!configGetval(RC_OWN_VAL))
         if (!configGetval(RC_GRP_VAL))

CVSTrac 2.0.1