dbus/dbus dbus-userdb-util.c,1.8,1.9 dbus-userdb.c,1.21,1.22

Tim Dijkstra tdykstra at kemper.freedesktop.org
Tue Dec 12 14:01:24 PST 2006


Update of /cvs/dbus/dbus/dbus
In directory kemper:/tmp/cvs-serv23946/dbus

Modified Files:
	dbus-userdb-util.c dbus-userdb.c 
Log Message:
* configure.in: Added switch to disable user_database caching.

* dbus/dbus-userdb-util.c, dbus/dbus-userdb.c: Add ifdefs to   
be able disable user_dabase caching.



Index: dbus-userdb-util.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-userdb-util.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- dbus-userdb-util.c	12 Dec 2006 21:24:07 -0000	1.8
+++ dbus-userdb-util.c	12 Dec 2006 22:01:22 -0000	1.9
@@ -234,7 +234,7 @@
         gid = n;
     }
 
-
+#ifdef DBUS_ENABLE_USER_CACHE
   if (gid != DBUS_GID_UNSET)
     info = _dbus_hash_table_lookup_ulong (db->groups, gid);
   else
@@ -247,6 +247,9 @@
       return info;
     }
   else
+#else
+  if (1)
+#endif
     {
       if (gid != DBUS_GID_UNSET)
 	_dbus_verbose ("No cache for GID "DBUS_GID_FORMAT"\n",

Index: dbus-userdb.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-userdb.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- dbus-userdb.c	12 Dec 2006 21:24:07 -0000	1.21
+++ dbus-userdb.c	12 Dec 2006 22:01:22 -0000	1.22
@@ -118,11 +118,12 @@
         uid = n;
     }
 
+#ifdef DBUS_ENABLE_USER_CACHE  
   if (uid != DBUS_UID_UNSET)
     info = _dbus_hash_table_lookup_ulong (db->users, uid);
   else
     info = _dbus_hash_table_lookup_string (db->users_by_name, _dbus_string_get_const_data (username));
-  
+
   if (info)
     {
       _dbus_verbose ("Using cache for UID "DBUS_UID_FORMAT" information\n",
@@ -130,6 +131,9 @@
       return info;
     }
   else
+#else 
+  if (1)
+#endif
     {
       if (uid != DBUS_UID_UNSET)
 	_dbus_verbose ("No cache for UID "DBUS_UID_FORMAT"\n",



More information about the dbus-commit mailing list