dbus/bus bus.c,1.70,1.71 main.c,1.34,1.35

Havoc Pennington hp at kemper.freedesktop.org
Sat Sep 16 08:34:37 PDT 2006


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

Modified Files:
	bus.c main.c 
Log Message:
2006-09-16  Havoc Pennington  <hp at redhat.com>

	* dbus/dbus-sysdeps-unix.h: small change to Peter's patch to make
	dbus-sysdeps-unix-util.c build, add unix-specific sysdeps header.

	* dbus/dbus-sysdeps.h, dbus-sysdeps-unix.c: patch from Peter 
	Kümmel bug #8249 to make the sysdeps.h read/write/open/close
	functions specifically for sockets only, and move generic 
	read/write/open/close into unix-specific code.



Index: bus.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/bus.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- bus.c	18 Aug 2006 20:24:56 -0000	1.70
+++ bus.c	16 Sep 2006 15:34:34 -0000	1.71
@@ -630,7 +630,7 @@
         }
 
       bytes = _dbus_string_get_length (&addr);
-      if (_dbus_write (print_addr_fd, &addr, 0, bytes) != bytes)
+      if (_dbus_write_socket (print_addr_fd, &addr, 0, bytes) != bytes)
         {
           dbus_set_error (error, DBUS_ERROR_FAILED,
                           "Printing message bus address: %s\n",
@@ -640,7 +640,7 @@
         }
 
       if (print_addr_fd > 2)
-        _dbus_close (print_addr_fd, NULL);
+        _dbus_close_socket (print_addr_fd, NULL);
 
       _dbus_string_free (&addr);
     }
@@ -731,7 +731,7 @@
         }
 
       bytes = _dbus_string_get_length (&pid);
-      if (_dbus_write (print_pid_fd, &pid, 0, bytes) != bytes)
+      if (_dbus_write_socket (print_pid_fd, &pid, 0, bytes) != bytes)
         {
           dbus_set_error (error, DBUS_ERROR_FAILED,
                           "Printing message bus PID: %s\n",
@@ -741,7 +741,7 @@
         }
 
       if (print_pid_fd > 2)
-        _dbus_close (print_pid_fd, NULL);
+        _dbus_close_socket (print_pid_fd, NULL);
       
       _dbus_string_free (&pid);
     }

Index: main.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/main.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- main.c	7 Sep 2006 18:24:11 -0000	1.34
+++ main.c	16 Sep 2006 15:34:34 -0000	1.35
@@ -51,7 +51,7 @@
 #endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX  */
     case SIGHUP:
       _dbus_string_init_const (&str, "foo");
-      if (!_dbus_write (reload_pipe[RELOAD_WRITE_END], &str, 0, 1))
+      if (!_dbus_write_socket (reload_pipe[RELOAD_WRITE_END], &str, 0, 1))
 	{
 	  _dbus_warn ("Unable to write to reload pipe.\n");
 	  exit (1);
@@ -150,7 +150,7 @@
   DBusError error;
   DBusString str;
   _dbus_string_init (&str);
-  if (_dbus_read (reload_pipe[RELOAD_READ_END], &str, 1) != 1)
+  if (_dbus_read_socket (reload_pipe[RELOAD_READ_END], &str, 1) != 1)
     {
       _dbus_warn ("Couldn't read from reload pipe.\n");
       exit (1);



More information about the dbus-commit mailing list