dbus/bus config-parser.c,1.45,1.46

John Palmieri johnp at kemper.freedesktop.org
Thu Nov 2 15:56:50 PST 2006


Update of /cvs/dbus/dbus/bus
In directory kemper:/tmp/cvs-serv20681/bus

Modified Files:
	config-parser.c 
Log Message:
* bus/config-parser.c (service_dirs_find_dir): use 
  _dbus_list_get_next_link so we don't get stuck in an infinite loop
  (start_busconfig_child): move processing of standard_session_servicedirs
  tags here because they have no content
  (bus_config_parser_content): check we don't have content in 
  standard_session_servicedirs tag

* tools/Makefile.am: Make sure the /var/lib/dbus directory is created
  Packagers need to own this directory


Index: config-parser.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/config-parser.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- config-parser.c	1 Nov 2006 23:30:46 -0000	1.45
+++ config-parser.c	2 Nov 2006 23:56:48 -0000	1.46
@@ -297,7 +297,7 @@
 
   _dbus_assert (dir != NULL);
 
-  for (link = *service_dirs; link; link = link->next)
+  for (link = *service_dirs; link; link = _dbus_list_get_next_link(service_dirs, link))
     {
       const char *link_dir;
       
@@ -805,6 +805,10 @@
     }
   else if (strcmp (element_name, "standard_session_servicedirs") == 0)
     {
+      DBusList *link;
+      DBusList *dirs;
+      dirs = NULL;
+
       if (!check_no_attributes (parser, "standard_session_servicedirs", attribute_names, attribute_values, error))
         return FALSE;
 
@@ -814,6 +818,15 @@
           return FALSE;
         }
 
+      if (!_dbus_get_standard_session_servicedirs (&dirs))
+        {
+          BUS_SET_OOM (error);
+          return FALSE;
+        }
+
+        while ((link = _dbus_list_pop_first_link (&dirs)))
+          service_dirs_append_link_unique_or_free (&parser->service_dirs, link);
+
       return TRUE;
     }
   else if (strcmp (element_name, "servicedir") == 0)
@@ -2191,6 +2204,7 @@
     case ELEMENT_ALLOW:
     case ELEMENT_DENY:
     case ELEMENT_FORK:
+    case ELEMENT_STANDARD_SESSION_SERVICEDIRS:    
     case ELEMENT_SELINUX:
     case ELEMENT_ASSOCIATE:
       if (all_whitespace (content))
@@ -2352,19 +2366,6 @@
           }
       }
       break;
-    case ELEMENT_STANDARD_SESSION_SERVICEDIRS:
-      {
-        DBusList *link;
-        DBusList *dirs;
-        dirs = NULL;
-
-        if (!_dbus_get_standard_session_servicedirs (&dirs))
-          goto nomem;
-
-        while ((link = _dbus_list_pop_first_link (&dirs)))
-          service_dirs_append_link_unique_or_free (&parser->service_dirs, link);
-      }
-      break;
 
     case ELEMENT_SERVICEDIR:
       {



More information about the dbus-commit mailing list