diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-27 16:26:01 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-27 16:26:01 +0100 |
| commit | e742f63e9c56cc2c913fa8cfda7a9d583a2c2aa2 (patch) | |
| tree | a08cc57de6544f3521ae7758f3746c6c515dc53f /src/Daemon/CommLayerServerDBus.cpp | |
| parent | 8448f22c260be4f6e7732a193f330fd6cd94d9b6 (diff) | |
| download | abrt-e742f63e9c56cc2c913fa8cfda7a9d583a2c2aa2.tar.gz abrt-e742f63e9c56cc2c913fa8cfda7a9d583a2c2aa2.tar.xz abrt-e742f63e9c56cc2c913fa8cfda7a9d583a2c2aa2.zip | |
abrtd: proper fix to autostart problem
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/CommLayerServerDBus.cpp')
| -rw-r--r-- | src/Daemon/CommLayerServerDBus.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp index f1f10e50..f2471586 100644 --- a/src/Daemon/CommLayerServerDBus.cpp +++ b/src/Daemon/CommLayerServerDBus.cpp @@ -565,6 +565,17 @@ CCommLayerServerDBus::CCommLayerServerDBus() //maybe check that r == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER instead? handle_dbus_err(rc < 0, &err); VERB3 log("dbus init done"); + + /* dbus_bus_request_name can already read some data. For example, + * if we were autostarted, the call which caused autostart arrives + * at this moment. Thus while dbus fd hasn't any data anymore, + * dbus library can buffer a message or two. + * If we don't do this, the data won't be processed + * until next dbus data arrives. + */ + int cnt = 10; + while (dbus_connection_dispatch(conn) != DBUS_DISPATCH_COMPLETE && --cnt) + VERB3 log("processed initial buffered dbus message"); } CCommLayerServerDBus::~CCommLayerServerDBus() |
