From: Paul Eggert Date: Wed, 11 Sep 2019 17:19:07 +0000 (-0700) Subject: Reset dbus registered buses on dump load X-Git-Tag: emacs-27.0.90~1551^2~98 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a6daae7b3df3a964b3dcde85987c02fd0af66a89;p=emacs.git Reset dbus registered buses on dump load Problem reported by Leonard Lausen (Bug#37331). * src/dbusbind.c: Include pdumper.h. (syms_of_dbusbind_for_pdumper): New function, to reset the registered buses. (syms_of_dbusbind): Use it, fixing a TODO. --- diff --git a/src/dbusbind.c b/src/dbusbind.c index 7f4c8717f42..de67dc94f9e 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -26,6 +26,7 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "termhooks.h" #include "keyboard.h" +#include "pdumper.h" #include "process.h" #ifndef DBUS_NUM_MESSAGE_TYPES @@ -1681,6 +1682,12 @@ init_dbusbind (void) xputenv ("DBUS_FATAL_WARNINGS=0"); } +static void +syms_of_dbusbind_for_pdumper (void) +{ + xd_registered_buses = Qnil; +} + void syms_of_dbusbind (void) { @@ -1829,13 +1836,10 @@ be called when the D-Bus reply message arrives. */); #endif /* Initialize internal objects. */ - xd_registered_buses = Qnil; + pdumper_do_now_and_after_load (syms_of_dbusbind_for_pdumper); staticpro (&xd_registered_buses); - // TODO: reset buses on dump load - Fprovide (intern_c_string ("dbusbind"), Qnil); - } #endif /* HAVE_DBUS */