ofdbus/dbus-glib/tsrc/testapps/dbus_glib_signal_server2/src/dbus_glib_signal_server2.c
changeset 50 79045913e4e9
parent 0 e4d67989cc36
child 57 2efc27d87e1c
equal deleted inserted replaced
49:e5d77a29bdca 50:79045913e4e9
    63 	
    63 	
    64 	signal_second++;
    64 	signal_second++;
    65 	if(signal_second == 2)
    65 	if(signal_second == 2)
    66 	{
    66 	{
    67 		fd = open(fifopath, O_WRONLY);
    67 		fd = open(fifopath, O_WRONLY);
       
    68 		sleep(2);
    68 		if(fd > 0)
    69 		if(fd > 0)
    69 		{
    70 		{
    70 			if(signal_first == 1)
    71 			if(signal_first == 1)
    71 				buf1 = "1";
    72 				buf1 = "1";
    72 			if(signal_first == 2)
    73 			if(signal_first == 2)
   117 	  dbus_g_proxy_connect_signal (proxy, "HelloSignal", G_CALLBACK (hello_signal_handler),
   118 	  dbus_g_proxy_connect_signal (proxy, "HelloSignal", G_CALLBACK (hello_signal_handler),
   118 				       NULL, NULL);
   119 				       NULL, NULL);
   119 	  dbus_g_proxy_connect_signal (proxy, "HelloSignal", G_CALLBACK (hello_signal_handler1),
   120 	  dbus_g_proxy_connect_signal (proxy, "HelloSignal", G_CALLBACK (hello_signal_handler1),
   120 		       NULL, NULL);
   121 		       NULL, NULL);
   121 	   fd = open(fifopath, O_WRONLY);
   122 	   fd = open(fifopath, O_WRONLY);
       
   123 	   sleep(2);
   122        if (fd > 0)
   124        if (fd > 0)
   123           {
   125           {
   124           err = write(fd, buf1, strlen(buf1));
   126           err = write(fd, buf1, strlen(buf1));
   125           close(fd);
   127           close(fd);
   126           }
   128           }