<table><tr><td style="">jpalecek edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-hlvcgylhjfpntec/">(Show Details)</a><br />jpalecek edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-po7wntleecj762q/">(Show Details)</a>
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D19514">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div> - KDNSSD objects used with this avahi instance stop working, and are unusable in the future<br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> </span>In this diff, mostly the first problem is tackled. I add a new singleton class, ##AvahiDisconnectListener##, which will provide a signal when avahi goes away. Every KDNSSD object would listen for that signal and perform the necessary cleanup. This means, in this diff, mostly deleting dbus objects and clearing dbus addresses.<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> </span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
</span>On top of that, the ##PublicService## class is changed that it reports failure to publish with a ##published(false)## signal, and a ##RemoteService## reports failure with ##resolved(false)##. The latter should be able to restart when convienient with ##resolveAsync##.<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> </span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
</span>Other objects are simply left in a consistent, but nonworking state and can't be used anymore, because they lack the signals to signal error, and methods to restart their operations.<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> </span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
</span>Looking forward, this patch could be extended by adding aforementioned error signals, or even, providing a much better user experience, automatically restarting normal operation when avahi comes on again. That information is doable in the client, but is tedious and error prone, as it needs listening for DBus ##NameOwnerChanged##, and then correctly wait because Avahi isn't ready for business right away. Also, you need to manage all the race conditions.</div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;">Launch kopete with an (online) Bonjour Account and run<br />
<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
</span> WARNING: this stops avahi<br />
# systemctl mask avahi-daemon.socket; systemctl stop avahi-daemon;<br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> </span>kopete should notice immediately that Bonjour isn't online anymore. Ideally, when you restart avahi with<br />
<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
</span> # systemctl unmask avahi-daemon.socket; systemctl start avahi-daemon<br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> </span>kopete should make Bonjour online immediately, however that neds more work</div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R272 KDNSSD</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19514">https://phabricator.kde.org/D19514</a></div></div><br /><div><strong>To: </strong>jpalecek<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>