OSSP CVS Repository

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

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

--- rc_config.c  2002/03/26 17:11:06     1.6
+++ rc_config.c  2002/04/08 15:37:10     1.7
@@ -34,7 +34,6 @@
 #include "rc_private.h"
 #include "rc_const.h"               /* String constants                 */
 #include "rc_option.h"              /* Option operations rely on popt   */
-#include "val.h"                    /* OSSP val library holds config    */
 
 static rc_config_t *s_pInst = NULL; /* Singleton configuration instance */
 
@@ -47,15 +46,15 @@
 {
     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             */
+    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;
 
-        ex_try {                            /* Make a val instance  */
-            val_create(&s_pInst->pOpt);     /* to hold individual   */
-        }                                   /* configuration values */
+        ex_try {
+                                            /* Make a config instance */
+        }
         ex_catch(Except) {
             rethrow;
         }
@@ -76,7 +75,7 @@
 
     if (s_pInst != NULL) {
         ex_try {
-            val_get(s_pInst->pOpt, RC_VER_NAME, &nVer);
+
         }
         ex_catch(Except) {
             rethrow;
@@ -110,10 +109,7 @@
         rethrow;
     }
 
-    ex_try {    /* Register and set configuration values */
-        /* FIXME This is real bad, replace with our own  */
-        val_reg(s_pInst->pOpt, RC_VER_NAME, VAL_TYPE_SHORT, RC_VER_DESC, NULL);
-        val_set(s_pInst->pOpt, RC_VER_NAME, 1);
+    ex_try {
     }
     ex_catch(Except) {
         rethrow;
@@ -133,8 +129,8 @@
     if (s_pInst) {
         if (!(--s_pInst->nLocks)) {         /* If nLocks is 0, dealloc  */
             ex_try {                        /* FIXME, not thread-safe   */
-                val_destroy(s_pInst->pOpt); /* Destroy val instance and */
-            }                               /* Assume that pOpt is NULL */
+
+            }
             ex_catch(Except) {
                 rethrow;
             }

CVSTrac 2.0.1