OSSP CVS Repository

ossp - Check-in [2063]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2063
Date: 2002-Apr-09 19:01:54 (local)
2002-Apr-09 17:01:54 (UTC)
User:ms
Branch:
Comment: Flush configuration changes.
Tickets:
Inspections:
Files:
ossp-pkg/rc/Makefile.in      1.18 -> 1.19     2 inserted, 2 deleted
ossp-pkg/rc/rc.h      1.14 -> 1.15     7 inserted, 0 deleted
ossp-pkg/rc/rc_config.c      1.7 -> 1.8     14 inserted, 13 deleted
ossp-pkg/rc/rc_private.h      1.8 -> 1.9     4 inserted, 5 deleted

ossp-pkg/rc/Makefile.in 1.18 -> 1.19

--- Makefile.in  2002/04/08 15:37:09     1.18
+++ Makefile.in  2002/04/09 17:01:54     1.19
@@ -60,10 +60,10 @@
 TARGET_MANS     = rc.1 rc-sample.5
 
 SRCS            = rc.c rc_config.c rc_optimpl.c rc_option.c\
-                  rc_version.c rc_pcre.c rc_util.c
+                  rc_cliopt.c rc_version.c rc_pcre.c rc_util.c
 
 OBJS            = rc.o rc_config.o rc_optimpl.o rc_option.o\
-                  rc_version.o rc_pcre.o rc_util.o
+                  rc_cliopt.o rc_version.o rc_pcre.o rc_util.o
 
 SUBDIRS         = @SUBDIR_EX@ @SUBDIR_POPT@
 #SUBDIRS         = @SUBDIR_EX@ @SUBDIR_VAR@ @SUBDIR_VAL@ @SUBDIR_STR@ @SUBDIR_POPT@


ossp-pkg/rc/rc.h 1.14 -> 1.15

--- rc.h 2002/03/26 17:11:06     1.14
+++ rc.h 2002/04/09 17:01:54     1.15
@@ -79,6 +79,13 @@
 /* Config accessor prototypes */
 short configGetvers(void);
 
+/* Command line function prototypes */
+rc_return_t clioptConstruct(void);
+rc_return_t clioptDestruct(void);
+
+/* Command line accessor prototypes */
+short clioptGetvers(void);
+
 /* Utility (nonbounded) function prototypes */
 char *strErr(rc_return_t);
 


ossp-pkg/rc/rc_config.c 1.7 -> 1.8

--- rc_config.c  2002/04/08 15:37:10     1.7
+++ rc_config.c  2002/04/09 17:01:54     1.8
@@ -33,9 +33,10 @@
 #include "rc.h"
 #include "rc_private.h"
 #include "rc_const.h"               /* String constants                 */
+#include "rc_config.h"              /* Config types and constants       */
 #include "rc_option.h"              /* Option operations rely on popt   */
 
-static rc_config_t *s_pInst = NULL; /* Singleton configuration instance */
+static rc_config_t *s_pInst = NULL; /* Singleton config instance        */
 
 
 /***************************************
@@ -46,20 +47,20 @@
 {
     ex_t Except;
 
-    if (s_pInst == NULL) {                  /* If we don't have one   */
-        s_pInst = malloc(sizeof(s_pInst));  /* yet, then allocate     */
-        if (!s_pInst)                       /* a configuration        */
-            return(RC_THROW(RC_ERR_MEM));   /* instance               */
-        s_pInst->nLocks = 0;
+    if (s_pInst == NULL) {                  /* If we don't have one     */
+        s_pInst = malloc(sizeof(s_pInst));  /* yet, then allocate       */
+        if (!s_pInst)                       /* a config instance        */
+            return(RC_THROW(RC_ERR_MEM));
+        s_pInst->m_nLocks = 0;
 
         ex_try {
-                                            /* Make a config instance */
+            clioptConstruct();              /* Make a config instance   */
         }
         ex_catch(Except) {
             rethrow;
         }
     }
-    s_pInst->nLocks++;                      /* FIXME not threadsafe */
+    s_pInst->m_nLocks++;                    /* FIXME not threadsafe     */
 
     return(RC_THROW(RC_OK));
 }
@@ -127,16 +128,16 @@
     ex_t Except;
 
     if (s_pInst) {
-        if (!(--s_pInst->nLocks)) {         /* If nLocks is 0, dealloc  */
-            ex_try {                        /* FIXME, not thread-safe   */
-
+        if (--s_pInst->m_nLocks == 0) { /* If m_nLocks is 0, dealloc    */
+            ex_try {                    /* FIXME, not thread-safe       */
+                clioptDestruct();
             }
             ex_catch(Except) {
                 rethrow;
             }
 
-            free(s_pInst);                  /* Deallocate configuration */
-            s_pInst = NULL;                 /* and clear its reference  */
+            free(s_pInst);              /* Deallocate config and        */
+            s_pInst = NULL;             /* clear its reference          */
         }
     }
     else


ossp-pkg/rc/rc_private.h 1.8 -> 1.9

--- rc_private.h 2002/04/08 15:37:10     1.8
+++ rc_private.h 2002/04/09 17:01:54     1.9
@@ -60,10 +60,9 @@
     ((rv) != RC_OK && (ex_catching && !ex_shielding) \
      ? (ex_throw(RC_STR_ID, NULL, (rv)), (rv)) : (rv))
 
-
-typedef struct {    /* Main rc configuration storage        */
-    void *pvFixme;  /* Storage of configuration values      */
-    int nLocks;     /* Server locks, not thread-safe FIXME  */
-} rc_config_t;
+typedef struct {    /* Simple linked list definition    */
+    void *pvData;
+    void *pvNext;
+} rc_list_t;
 
 #endif /* __OSSPRC_PRIVATE_H__ */

CVSTrac 2.0.1