r7624: * removed unmatched tdb_lock_by_string() call (should fix build farm issues)
authorGerald Carter <jerry@samba.org>
Thu, 16 Jun 2005 00:46:43 +0000 (00:46 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:57:17 +0000 (10:57 -0500)
* comment out services.tdb code until I finish rewriting it
(This used to be commit 707b7822286a6c7e9d1e4ca3d15b99c976f6e704)

source3/rpc_server/srv_svcctl_nt.c
source3/services/services_db.c
source3/smbd/server.c

index 268537777240c9374d937f2bb7a15826bdc5b890..3d34556340912e556559f0ffed7b2a1875458122 100644 (file)
@@ -445,9 +445,9 @@ WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STAT
        
        num_int_services = 0;
 
-       num_int_services = num_internal_services();
+       /* num_int_services = num_internal_services(); */
 
-       num_ext_services =  num_external_services();
+       /* num_ext_services =  num_external_services(); */
 
        if ( !(services = TALLOC_ARRAY(p->mem_ctx, ENUM_SERVICES_STATUS, num_int_services+num_ext_services )) )
           return WERR_NOMEM;
@@ -458,7 +458,7 @@ WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STAT
                DEBUG(8,("_svcctl_enum_services_status: Got %d internal services\n", num_int_services));
        } 
 
-       ext_result=enum_external_services(p->mem_ctx, &services, num_int_services, &num_ext_services);
+       /* ext_result=enum_external_services(p->mem_ctx, &services, num_int_services, &num_ext_services); */
 
        if (W_ERROR_IS_OK(ext_result)) {
                DEBUG(8,("_svcctl_enum_services_status: Got %d external services\n", num_ext_services));
index df743879596fc738e44e27412c192f579497ef6a..29c5a9f6e6969ec3e1d236ef779fa552483e6e6d 100644 (file)
@@ -21,6 +21,8 @@
 
 #include "includes.h"
 
+#if 0
+
 /* backend database routines for services.tdb */
 
 #define SERVICEDB_VERSION_V1 1 /* Will there be more? */
@@ -90,7 +92,6 @@ int num_external_services(void)
                num_services = 0;
        } else {
                pstrcpy(keystring,"EXTERNAL_SERVICES");
-               tdb_lock_bystring(service_tdb, keystring, 0);
                key_data = tdb_fetch_bystring(service_tdb, keystring);
 
                if ((key_data.dptr != NULL) && (key_data.dsize != 0)) {
@@ -98,7 +99,6 @@ int num_external_services(void)
                        external_services_string[key_data.dsize] = 0;
                        DEBUG(8,("enum_external_services: services list is %s, size is %d\n",external_services_string,key_data.dsize));
                }
-               tdb_unlock_bystring(service_tdb, keystring);
        } 
        svc_list = str_list_make(external_services_string,NULL);
  
@@ -147,14 +147,12 @@ WERROR enum_external_services(TALLOC_CTX *tcx,ENUM_SERVICES_STATUS **svc_ptr, in
                DEBUG(8,("enum_external_services: service database is not open!!!\n"));
        } else {
                pstrcpy(keystring,"EXTERNAL_SERVICES");
-               tdb_lock_bystring(service_tdb, keystring, 0);
                key_data = tdb_fetch_bystring(service_tdb, keystring);
                if ((key_data.dptr != NULL) && (key_data.dsize != 0)) {
                        strncpy(external_services_string,key_data.dptr,key_data.dsize);
                        external_services_string[key_data.dsize] = 0;
                        DEBUG(8,("enum_external_services: services list is %s, size is %d\n",external_services_string,key_data.dsize));
                }
-               tdb_unlock_bystring(service_tdb, keystring);
        } 
        svc_list = str_list_make(external_services_string,NULL);
  
@@ -275,7 +273,6 @@ int num_internal_services(void)
                num_services = 0;
        } else {
                pstrcpy(keystring,"INTERNAL_SERVICES");
-               tdb_lock_bystring(service_tdb, keystring, 0);
                key_data = tdb_fetch_bystring(service_tdb, keystring);
 
                if ((key_data.dptr != NULL) && (key_data.dsize != 0)) {
@@ -283,7 +280,6 @@ int num_internal_services(void)
                        internal_services_string[key_data.dsize] = 0;
                        DEBUG(8,("enum_internal_services: services list is %s, size is %d\n",internal_services_string,key_data.dsize));
                }
-               tdb_unlock_bystring(service_tdb, keystring);
        } 
        svc_list = str_list_make(internal_services_string,NULL);
  
@@ -473,7 +469,6 @@ BOOL store_service_info(TDB_CONTEXT *stdb,char *service_name, Service_info *si)
        tdb_store_bystring(stdb,keystring,string_tdb_data(si->description),TDB_REPLACE);
 
        pstr_sprintf(keystring,"SERVICE/%s/SHORTDESC", service_name);
-       tdb_lock_bystring(stdb, keystring, 0);
        if (si->shortdescription && *si->shortdescription) 
                tdb_store_bystring(stdb,keystring,string_tdb_data(si->shortdescription),TDB_REPLACE);
        else
@@ -539,10 +534,8 @@ BOOL init_svcctl_db(void)
                svcname++;
        }
        pstrcpy(keystring,"EXTERNAL_SERVICES");
-        tdb_lock_bystring(service_tdb, keystring, 0);
        DEBUG(8,("Storing external service list [%s]\n",external_service_list));
         tdb_store_bystring(service_tdb,keystring,string_tdb_data(external_service_list),TDB_REPLACE);
-        tdb_unlock_bystring(service_tdb,keystring);
 
        /* Get the INTERNAL services */
        
@@ -563,11 +556,9 @@ BOOL init_svcctl_db(void)
                isd_ptr++;
        }
        pstrcpy(keystring,"INTERNAL_SERVICES");
-        tdb_lock_bystring(service_tdb, keystring, 0);
        DEBUG(8,("Storing internal service list [%s]\n",internal_service_list));
         tdb_store_bystring(service_tdb,keystring,string_tdb_data(internal_service_list),TDB_REPLACE);
-        tdb_unlock_bystring(service_tdb,keystring);
 
        return True;
 }
-
+#endif
index e3d644824056a8859c2bfce4f6bc2a4d0963e3d8..b40a8267cc9ad42da4ad5761bcaf07fb2f8a1b35 100644 (file)
@@ -887,8 +887,10 @@ void build_options(BOOL screen);
        if (!init_registry())
                exit(1);
 
+#if 0
        if (!init_svcctl_db())
                 exit(1);
+#endif
 
        if (!print_backend_init())
                exit(1);