diff options
| author | Paul Eggert | 2019-09-11 10:19:07 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-09-11 10:19:31 -0700 |
| commit | a6daae7b3df3a964b3dcde85987c02fd0af66a89 (patch) | |
| tree | bcc340b5104636d35a66f831b84277efa10798f6 /src/dbusbind.c | |
| parent | 636856faa4de78912bf41eeaf0e639664a323424 (diff) | |
| download | emacs-a6daae7b3df3a964b3dcde85987c02fd0af66a89.tar.gz emacs-a6daae7b3df3a964b3dcde85987c02fd0af66a89.zip | |
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.
Diffstat (limited to 'src/dbusbind.c')
| -rw-r--r-- | src/dbusbind.c | 12 |
1 files changed, 8 insertions, 4 deletions
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 <https://www.gnu.org/licenses/>. */ | |||
| 26 | #include "lisp.h" | 26 | #include "lisp.h" |
| 27 | #include "termhooks.h" | 27 | #include "termhooks.h" |
| 28 | #include "keyboard.h" | 28 | #include "keyboard.h" |
| 29 | #include "pdumper.h" | ||
| 29 | #include "process.h" | 30 | #include "process.h" |
| 30 | 31 | ||
| 31 | #ifndef DBUS_NUM_MESSAGE_TYPES | 32 | #ifndef DBUS_NUM_MESSAGE_TYPES |
| @@ -1681,6 +1682,12 @@ init_dbusbind (void) | |||
| 1681 | xputenv ("DBUS_FATAL_WARNINGS=0"); | 1682 | xputenv ("DBUS_FATAL_WARNINGS=0"); |
| 1682 | } | 1683 | } |
| 1683 | 1684 | ||
| 1685 | static void | ||
| 1686 | syms_of_dbusbind_for_pdumper (void) | ||
| 1687 | { | ||
| 1688 | xd_registered_buses = Qnil; | ||
| 1689 | } | ||
| 1690 | |||
| 1684 | void | 1691 | void |
| 1685 | syms_of_dbusbind (void) | 1692 | syms_of_dbusbind (void) |
| 1686 | { | 1693 | { |
| @@ -1829,13 +1836,10 @@ be called when the D-Bus reply message arrives. */); | |||
| 1829 | #endif | 1836 | #endif |
| 1830 | 1837 | ||
| 1831 | /* Initialize internal objects. */ | 1838 | /* Initialize internal objects. */ |
| 1832 | xd_registered_buses = Qnil; | 1839 | pdumper_do_now_and_after_load (syms_of_dbusbind_for_pdumper); |
| 1833 | staticpro (&xd_registered_buses); | 1840 | staticpro (&xd_registered_buses); |
| 1834 | 1841 | ||
| 1835 | // TODO: reset buses on dump load | ||
| 1836 | |||
| 1837 | Fprovide (intern_c_string ("dbusbind"), Qnil); | 1842 | Fprovide (intern_c_string ("dbusbind"), Qnil); |
| 1838 | |||
| 1839 | } | 1843 | } |
| 1840 | 1844 | ||
| 1841 | #endif /* HAVE_DBUS */ | 1845 | #endif /* HAVE_DBUS */ |