Commit 7f8bb45
committed
Fix examples for high level service interface
If we first `request_name` and then `bus.export` our service
then there is a (short) period of time when we already own the name
but our MessageBus class doesn't know which services shall it provide.
As a result, if we get a request in this period of time,
we will reply with an error "SERVICE.METHOD with signature SIGNATURE not found".
This situation will happen regularly if we are started by dbus-daemon
because we were declared in the `.service` file. For example:
```
[D-BUS Service]
Name=test.name
Exec=/path/to/my/service.py
```
With the old vesion of examples, this will fail to handle the first request
for which D-Bus started our service.1 parent a55c363 commit 7f8bb45
3 files changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | 120 | | |
122 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | 80 | | |
82 | 81 | | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | 57 | | |
59 | 58 | | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments