aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Albinus2008-10-24 04:21:15 +0000
committerMichael Albinus2008-10-24 04:21:15 +0000
commit1dae919792baf5312a4cf42bf9ff647f31b4c03d (patch)
treeb172501cea71c372ce4f6e3fe4b2a421d1e0fb5f /src
parent802393f64281c404db5100c1ab67d30fa001661b (diff)
downloademacs-1dae919792baf5312a4cf42bf9ff647f31b4c03d.tar.gz
emacs-1dae919792baf5312a4cf42bf9ff647f31b4c03d.zip
* dbusbind.c (xd_in_read_queued_messages): New variable.
(XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros. Throw Qdbus_error. (xd_read_queued_messages): Catch Qdbus_error from the macros. (all): Replace xsignal1, xsignal2, xsignal3 by the respective macro. (Bug#1186).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/dbusbind.c119
2 files changed, 75 insertions, 53 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index eaa5d8299c8..eafe5ac553a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12008-10-24 Michael Albinus <michael.albinus@gmx.de>
2
3 * dbusbind.c (xd_in_read_queued_messages): New variable.
4 (XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros. Throw
5 Qdbus_error.
6 (xd_read_queued_messages): Catch Qdbus_error from the macros.
7 (all): Replace xsignal1, xsignal2, xsignal3 by the respective
8 macro. (Bug#1186).
9
12008-10-23 Ali Bahrami <ali_gnu@emvision.com> (tiny change) 102008-10-23 Ali Bahrami <ali_gnu@emvision.com> (tiny change)
2 11
3 * s/sol2-10.h: New file. 12 * s/sol2-10.h: New file.
diff --git a/src/dbusbind.c b/src/dbusbind.c
index dcab6fb214c..56facdd5b81 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -63,10 +63,39 @@ Lisp_Object Vdbus_registered_functions_table;
63/* Whether to debug D-Bus. */ 63/* Whether to debug D-Bus. */
64Lisp_Object Vdbus_debug; 64Lisp_Object Vdbus_debug;
65 65
66/* Whether we are reading a D-Bus event. */
67int xd_in_read_queued_messages = 0;
68
66 69
67/* We use "xd_" and "XD_" as prefix for all internal symbols, because 70/* We use "xd_" and "XD_" as prefix for all internal symbols, because
68 we don't want to poison other namespaces with "dbus_". */ 71 we don't want to poison other namespaces with "dbus_". */
69 72
73/* Raise a signal. If we are reading events, we cannot signal; we
74 throw to xd_read_queued_messages then. */
75#define XD_SIGNAL1(arg) \
76 do { \
77 if (xd_in_read_queued_messages) \
78 Fthrow (Qdbus_error, Qnil); \
79 else \
80 xsignal1 (Qdbus_error, arg); \
81 } while (0)
82
83#define XD_SIGNAL2(arg1, arg2) \
84 do { \
85 if (xd_in_read_queued_messages) \
86 Fthrow (Qdbus_error, Qnil); \
87 else \
88 xsignal2 (Qdbus_error, arg1, arg2); \
89 } while (0)
90
91#define XD_SIGNAL3(arg1, arg2, arg3) \
92 do { \
93 if (xd_in_read_queued_messages) \
94 Fthrow (Qdbus_error, Qnil); \
95 else \
96 xsignal3 (Qdbus_error, arg1, arg2, arg3); \
97 } while (0)
98
70/* Raise a Lisp error from a D-Bus ERROR. */ 99/* Raise a Lisp error from a D-Bus ERROR. */
71#define XD_ERROR(error) \ 100#define XD_ERROR(error) \
72 do { \ 101 do { \
@@ -76,7 +105,7 @@ Lisp_Object Vdbus_debug;
76 /* Remove the trailing newline. */ \ 105 /* Remove the trailing newline. */ \
77 if (strchr (s, '\n') != NULL) \ 106 if (strchr (s, '\n') != NULL) \
78 s[strlen (s) - 1] = '\0'; \ 107 s[strlen (s) - 1] = '\0'; \
79 xsignal1 (Qdbus_error, build_string (s)); \ 108 XD_SIGNAL1 (build_string (s)); \
80 } while (0) 109 } while (0)
81 110
82/* Macros for debugging. In order to enable them, build with 111/* Macros for debugging. In order to enable them, build with
@@ -94,7 +123,7 @@ Lisp_Object Vdbus_debug;
94 if (!valid_lisp_object_p (object)) \ 123 if (!valid_lisp_object_p (object)) \
95 { \ 124 { \
96 XD_DEBUG_MESSAGE ("%d Assertion failure", __LINE__); \ 125 XD_DEBUG_MESSAGE ("%d Assertion failure", __LINE__); \
97 xsignal1 (Qdbus_error, build_string ("Assertion failure")); \ 126 XD_SIGNAL1 (build_string ("Assertion failure")); \
98 } \ 127 } \
99 } while (0) 128 } while (0)
100 129
@@ -370,8 +399,7 @@ xd_append_arg (dtype, object, iter)
370 unsigned char val = XUINT (object) & 0xFF; 399 unsigned char val = XUINT (object) & 0xFF;
371 XD_DEBUG_MESSAGE ("%c %d", dtype, val); 400 XD_DEBUG_MESSAGE ("%c %d", dtype, val);
372 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 401 if (!dbus_message_iter_append_basic (iter, dtype, &val))
373 xsignal2 (Qdbus_error, 402 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
374 build_string ("Unable to append argument"), object);
375 return; 403 return;
376 } 404 }
377 405
@@ -380,8 +408,7 @@ xd_append_arg (dtype, object, iter)
380 dbus_bool_t val = (NILP (object)) ? FALSE : TRUE; 408 dbus_bool_t val = (NILP (object)) ? FALSE : TRUE;
381 XD_DEBUG_MESSAGE ("%c %s", dtype, (val == FALSE) ? "false" : "true"); 409 XD_DEBUG_MESSAGE ("%c %s", dtype, (val == FALSE) ? "false" : "true");
382 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 410 if (!dbus_message_iter_append_basic (iter, dtype, &val))
383 xsignal2 (Qdbus_error, 411 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
384 build_string ("Unable to append argument"), object);
385 return; 412 return;
386 } 413 }
387 414
@@ -390,8 +417,7 @@ xd_append_arg (dtype, object, iter)
390 dbus_int16_t val = XINT (object); 417 dbus_int16_t val = XINT (object);
391 XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val); 418 XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
392 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 419 if (!dbus_message_iter_append_basic (iter, dtype, &val))
393 xsignal2 (Qdbus_error, 420 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
394 build_string ("Unable to append argument"), object);
395 return; 421 return;
396 } 422 }
397 423
@@ -400,8 +426,7 @@ xd_append_arg (dtype, object, iter)
400 dbus_uint16_t val = XUINT (object); 426 dbus_uint16_t val = XUINT (object);
401 XD_DEBUG_MESSAGE ("%c %u", dtype, (unsigned int) val); 427 XD_DEBUG_MESSAGE ("%c %u", dtype, (unsigned int) val);
402 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 428 if (!dbus_message_iter_append_basic (iter, dtype, &val))
403 xsignal2 (Qdbus_error, 429 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
404 build_string ("Unable to append argument"), object);
405 return; 430 return;
406 } 431 }
407 432
@@ -410,8 +435,7 @@ xd_append_arg (dtype, object, iter)
410 dbus_int32_t val = XINT (object); 435 dbus_int32_t val = XINT (object);
411 XD_DEBUG_MESSAGE ("%c %d", dtype, val); 436 XD_DEBUG_MESSAGE ("%c %d", dtype, val);
412 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 437 if (!dbus_message_iter_append_basic (iter, dtype, &val))
413 xsignal2 (Qdbus_error, 438 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
414 build_string ("Unable to append argument"), object);
415 return; 439 return;
416 } 440 }
417 441
@@ -420,8 +444,7 @@ xd_append_arg (dtype, object, iter)
420 dbus_uint32_t val = XUINT (object); 444 dbus_uint32_t val = XUINT (object);
421 XD_DEBUG_MESSAGE ("%c %u", dtype, val); 445 XD_DEBUG_MESSAGE ("%c %u", dtype, val);
422 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 446 if (!dbus_message_iter_append_basic (iter, dtype, &val))
423 xsignal2 (Qdbus_error, 447 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
424 build_string ("Unable to append argument"), object);
425 return; 448 return;
426 } 449 }
427 450
@@ -430,8 +453,7 @@ xd_append_arg (dtype, object, iter)
430 dbus_int64_t val = XINT (object); 453 dbus_int64_t val = XINT (object);
431 XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val); 454 XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
432 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 455 if (!dbus_message_iter_append_basic (iter, dtype, &val))
433 xsignal2 (Qdbus_error, 456 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
434 build_string ("Unable to append argument"), object);
435 return; 457 return;
436 } 458 }
437 459
@@ -440,8 +462,7 @@ xd_append_arg (dtype, object, iter)
440 dbus_uint64_t val = XUINT (object); 462 dbus_uint64_t val = XUINT (object);
441 XD_DEBUG_MESSAGE ("%c %u", dtype, (unsigned int) val); 463 XD_DEBUG_MESSAGE ("%c %u", dtype, (unsigned int) val);
442 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 464 if (!dbus_message_iter_append_basic (iter, dtype, &val))
443 xsignal2 (Qdbus_error, 465 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
444 build_string ("Unable to append argument"), object);
445 return; 466 return;
446 } 467 }
447 468
@@ -449,8 +470,7 @@ xd_append_arg (dtype, object, iter)
449 XD_DEBUG_MESSAGE ("%c %f", dtype, XFLOAT_DATA (object)); 470 XD_DEBUG_MESSAGE ("%c %f", dtype, XFLOAT_DATA (object));
450 if (!dbus_message_iter_append_basic (iter, dtype, 471 if (!dbus_message_iter_append_basic (iter, dtype,
451 &XFLOAT_DATA (object))) 472 &XFLOAT_DATA (object)))
452 xsignal2 (Qdbus_error, 473 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
453 build_string ("Unable to append argument"), object);
454 return; 474 return;
455 475
456 case DBUS_TYPE_STRING: 476 case DBUS_TYPE_STRING:
@@ -460,8 +480,7 @@ xd_append_arg (dtype, object, iter)
460 char *val = SDATA (Fstring_make_unibyte (object)); 480 char *val = SDATA (Fstring_make_unibyte (object));
461 XD_DEBUG_MESSAGE ("%c %s", dtype, val); 481 XD_DEBUG_MESSAGE ("%c %s", dtype, val);
462 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 482 if (!dbus_message_iter_append_basic (iter, dtype, &val))
463 xsignal2 (Qdbus_error, 483 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
464 build_string ("Unable to append argument"), object);
465 return; 484 return;
466 } 485 }
467 } 486 }
@@ -509,9 +528,8 @@ xd_append_arg (dtype, object, iter)
509 SDATA (format2 ("%s", object, Qnil))); 528 SDATA (format2 ("%s", object, Qnil)));
510 if (!dbus_message_iter_open_container (iter, dtype, 529 if (!dbus_message_iter_open_container (iter, dtype,
511 signature, &subiter)) 530 signature, &subiter))
512 xsignal3 (Qdbus_error, 531 XD_SIGNAL3 (build_string ("Cannot open container"),
513 build_string ("Cannot open container"), 532 make_number (dtype), build_string (signature));
514 make_number (dtype), build_string (signature));
515 break; 533 break;
516 534
517 case DBUS_TYPE_VARIANT: 535 case DBUS_TYPE_VARIANT:
@@ -523,9 +541,8 @@ xd_append_arg (dtype, object, iter)
523 SDATA (format2 ("%s", object, Qnil))); 541 SDATA (format2 ("%s", object, Qnil)));
524 if (!dbus_message_iter_open_container (iter, dtype, 542 if (!dbus_message_iter_open_container (iter, dtype,
525 signature, &subiter)) 543 signature, &subiter))
526 xsignal3 (Qdbus_error, 544 XD_SIGNAL3 (build_string ("Cannot open container"),
527 build_string ("Cannot open container"), 545 make_number (dtype), build_string (signature));
528 make_number (dtype), build_string (signature));
529 break; 546 break;
530 547
531 case DBUS_TYPE_STRUCT: 548 case DBUS_TYPE_STRUCT:
@@ -534,9 +551,8 @@ xd_append_arg (dtype, object, iter)
534 XD_DEBUG_MESSAGE ("%c %s", dtype, 551 XD_DEBUG_MESSAGE ("%c %s", dtype,
535 SDATA (format2 ("%s", object, Qnil))); 552 SDATA (format2 ("%s", object, Qnil)));
536 if (!dbus_message_iter_open_container (iter, dtype, NULL, &subiter)) 553 if (!dbus_message_iter_open_container (iter, dtype, NULL, &subiter))
537 xsignal2 (Qdbus_error, 554 XD_SIGNAL2 (build_string ("Cannot open container"),
538 build_string ("Cannot open container"), 555 make_number (dtype));
539 make_number (dtype));
540 break; 556 break;
541 } 557 }
542 558
@@ -553,9 +569,8 @@ xd_append_arg (dtype, object, iter)
553 569
554 /* Close the subiteration. */ 570 /* Close the subiteration. */
555 if (!dbus_message_iter_close_container (iter, &subiter)) 571 if (!dbus_message_iter_close_container (iter, &subiter))
556 xsignal2 (Qdbus_error, 572 XD_SIGNAL2 (build_string ("Cannot close container"),
557 build_string ("Cannot close container"), 573 make_number (dtype));
558 make_number (dtype));
559 } 574 }
560} 575}
561 576
@@ -677,7 +692,7 @@ xd_initialize (bus)
677 /* Parameter check. */ 692 /* Parameter check. */
678 CHECK_SYMBOL (bus); 693 CHECK_SYMBOL (bus);
679 if (!((EQ (bus, QCdbus_system_bus)) || (EQ (bus, QCdbus_session_bus)))) 694 if (!((EQ (bus, QCdbus_system_bus)) || (EQ (bus, QCdbus_session_bus))))
680 xsignal2 (Qdbus_error, build_string ("Wrong bus name"), bus); 695 XD_SIGNAL2 (build_string ("Wrong bus name"), bus);
681 696
682 /* Open a connection to the bus. */ 697 /* Open a connection to the bus. */
683 dbus_error_init (&derror); 698 dbus_error_init (&derror);
@@ -691,7 +706,7 @@ xd_initialize (bus)
691 XD_ERROR (derror); 706 XD_ERROR (derror);
692 707
693 if (connection == NULL) 708 if (connection == NULL)
694 xsignal2 (Qdbus_error, build_string ("No connection"), bus); 709 XD_SIGNAL2 (build_string ("No connection"), bus);
695 710
696 /* Return the result. */ 711 /* Return the result. */
697 return connection; 712 return connection;
@@ -715,7 +730,7 @@ DEFUN ("dbus-get-unique-name", Fdbus_get_unique_name, Sdbus_get_unique_name,
715 /* Request the name. */ 730 /* Request the name. */
716 name = dbus_bus_get_unique_name (connection); 731 name = dbus_bus_get_unique_name (connection);
717 if (name == NULL) 732 if (name == NULL)
718 xsignal1 (Qdbus_error, build_string ("No unique name available")); 733 XD_SIGNAL1 (build_string ("No unique name available"));
719 734
720 /* Return. */ 735 /* Return. */
721 return build_string (name); 736 return build_string (name);
@@ -836,7 +851,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI
836 SDATA (method)); 851 SDATA (method));
837 UNGCPRO; 852 UNGCPRO;
838 if (dmessage == NULL) 853 if (dmessage == NULL)
839 xsignal1 (Qdbus_error, build_string ("Unable to create a new message")); 854 XD_SIGNAL1 (build_string ("Unable to create a new message"));
840 855
841 /* Check for timeout parameter. */ 856 /* Check for timeout parameter. */
842 if ((i+2 <= nargs) && (EQ ((args[i]), QCdbus_timeout))) 857 if ((i+2 <= nargs) && (EQ ((args[i]), QCdbus_timeout)))
@@ -887,7 +902,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI
887 XD_ERROR (derror); 902 XD_ERROR (derror);
888 903
889 if (reply == NULL) 904 if (reply == NULL)
890 xsignal1 (Qdbus_error, build_string ("No reply")); 905 XD_SIGNAL1 (build_string ("No reply"));
891 906
892 XD_DEBUG_MESSAGE ("Message sent"); 907 XD_DEBUG_MESSAGE ("Message sent");
893 908
@@ -1018,7 +1033,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE
1018 SDATA (interface), 1033 SDATA (interface),
1019 SDATA (method)); 1034 SDATA (method));
1020 if (dmessage == NULL) 1035 if (dmessage == NULL)
1021 xsignal1 (Qdbus_error, build_string ("Unable to create a new message")); 1036 XD_SIGNAL1 (build_string ("Unable to create a new message"));
1022 1037
1023 /* Check for timeout parameter. */ 1038 /* Check for timeout parameter. */
1024 if ((i+2 <= nargs) && (EQ ((args[i]), QCdbus_timeout))) 1039 if ((i+2 <= nargs) && (EQ ((args[i]), QCdbus_timeout)))
@@ -1061,7 +1076,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE
1061 /* Send the message. The message is just added to the outgoing 1076 /* Send the message. The message is just added to the outgoing
1062 message queue. */ 1077 message queue. */
1063 if (!dbus_connection_send_with_reply (connection, dmessage, NULL, timeout)) 1078 if (!dbus_connection_send_with_reply (connection, dmessage, NULL, timeout))
1064 xsignal1 (Qdbus_error, build_string ("Cannot send message")); 1079 XD_SIGNAL1 (build_string ("Cannot send message"));
1065 1080
1066 XD_DEBUG_MESSAGE ("Message sent"); 1081 XD_DEBUG_MESSAGE ("Message sent");
1067 1082
@@ -1120,8 +1135,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */)
1120 || (!dbus_message_set_destination (dmessage, SDATA (service)))) 1135 || (!dbus_message_set_destination (dmessage, SDATA (service))))
1121 { 1136 {
1122 UNGCPRO; 1137 UNGCPRO;
1123 xsignal1 (Qdbus_error, 1138 XD_SIGNAL1 (build_string ("Unable to create a return message"));
1124 build_string ("Unable to create a return message"));
1125 } 1139 }
1126 1140
1127 UNGCPRO; 1141 UNGCPRO;
@@ -1159,7 +1173,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */)
1159 /* Send the message. The message is just added to the outgoing 1173 /* Send the message. The message is just added to the outgoing
1160 message queue. */ 1174 message queue. */
1161 if (!dbus_connection_send (connection, dmessage, NULL)) 1175 if (!dbus_connection_send (connection, dmessage, NULL))
1162 xsignal1 (Qdbus_error, build_string ("Cannot send message")); 1176 XD_SIGNAL1 (build_string ("Cannot send message"));
1163 1177
1164 /* Flush connection to ensure the message is handled. */ 1178 /* Flush connection to ensure the message is handled. */
1165 dbus_connection_flush (connection); 1179 dbus_connection_flush (connection);
@@ -1216,8 +1230,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */)
1216 || (!dbus_message_set_destination (dmessage, SDATA (service)))) 1230 || (!dbus_message_set_destination (dmessage, SDATA (service))))
1217 { 1231 {
1218 UNGCPRO; 1232 UNGCPRO;
1219 xsignal1 (Qdbus_error, 1233 XD_SIGNAL1 (build_string ("Unable to create a error message"));
1220 build_string ("Unable to create a error message"));
1221 } 1234 }
1222 1235
1223 UNGCPRO; 1236 UNGCPRO;
@@ -1255,7 +1268,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */)
1255 /* Send the message. The message is just added to the outgoing 1268 /* Send the message. The message is just added to the outgoing
1256 message queue. */ 1269 message queue. */
1257 if (!dbus_connection_send (connection, dmessage, NULL)) 1270 if (!dbus_connection_send (connection, dmessage, NULL))
1258 xsignal1 (Qdbus_error, build_string ("Cannot send message")); 1271 XD_SIGNAL1 (build_string ("Cannot send message"));
1259 1272
1260 /* Flush connection to ensure the message is handled. */ 1273 /* Flush connection to ensure the message is handled. */
1261 dbus_connection_flush (connection); 1274 dbus_connection_flush (connection);
@@ -1340,7 +1353,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */)
1340 SDATA (signal)); 1353 SDATA (signal));
1341 UNGCPRO; 1354 UNGCPRO;
1342 if (dmessage == NULL) 1355 if (dmessage == NULL)
1343 xsignal1 (Qdbus_error, build_string ("Unable to create a new message")); 1356 XD_SIGNAL1 (build_string ("Unable to create a new message"));
1344 1357
1345 /* Initialize parameter list of message. */ 1358 /* Initialize parameter list of message. */
1346 dbus_message_iter_init_append (dmessage, &iter); 1359 dbus_message_iter_init_append (dmessage, &iter);
@@ -1375,7 +1388,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */)
1375 /* Send the message. The message is just added to the outgoing 1388 /* Send the message. The message is just added to the outgoing
1376 message queue. */ 1389 message queue. */
1377 if (!dbus_connection_send (connection, dmessage, NULL)) 1390 if (!dbus_connection_send (connection, dmessage, NULL))
1378 xsignal1 (Qdbus_error, build_string ("Cannot send message")); 1391 XD_SIGNAL1 (build_string ("Cannot send message"));
1379 1392
1380 /* Flush connection to ensure the message is handled. */ 1393 /* Flush connection to ensure the message is handled. */
1381 dbus_connection_flush (connection); 1394 dbus_connection_flush (connection);
@@ -1557,10 +1570,10 @@ xd_read_queued_messages ()
1557 Lisp errors during the call. */ 1570 Lisp errors during the call. */
1558 if (HASH_TABLE_P (Vdbus_registered_functions_table)) 1571 if (HASH_TABLE_P (Vdbus_registered_functions_table))
1559 { 1572 {
1560 internal_condition_case_1 (xd_read_message, QCdbus_system_bus, 1573 xd_in_read_queued_messages = 1;
1561 Qerror, Fidentity); 1574 internal_catch (Qdbus_error, xd_read_message, QCdbus_system_bus);
1562 internal_condition_case_1 (xd_read_message, QCdbus_session_bus, 1575 internal_catch (Qdbus_error, xd_read_message, QCdbus_session_bus);
1563 Qerror, Fidentity); 1576 xd_in_read_queued_messages = 0;
1564 } 1577 }
1565} 1578}
1566 1579