summaryrefslogtreecommitdiff
path: root/common/gvfsdnssdresolver.c
Commit message (Collapse)AuthorAgeFilesLines
* dnssd: Prevent crashes after releasing resolverOndrej Holy2020-01-271-2/+6
| | | | | | | | | | | | | | | | | | | | The following error often happens when mounting dav+sd share (e.g. created over gnome-user-media) and the mount operation fails for some reason: dbus[47482]: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2823. This is normally a bug in some application using the D-Bus library. This is because avahi is not thread-safe and our resolver doesn't use mutexes. But it seems to me that mutexes are not necessarily needed if everything would work as expected. Unfortunately, changes made by commit 3384af8 causes that start_avahi_resolver is being called multiple times by mistake, which also calls avahi_service_resolver_new multiple times. Consequently, it may crash when resolver is beeing freed too early as there might still be unexpected pending operations using avahi client. Fixes: GNOME/gvfs#449
* dnssd: guard avahi_client_free to prevent freeing NULLTobias Mueller2019-11-271-1/+4
| | | | | | | This should not happen, but somehow the global_client ends up being NULL. In daemon/gvfsbackenddnssd.c the call to avahi_client_free in the finalize function is similarly guarded.
* common: Add interface property for GVfsDnsSdResolverOndrej Holy2019-10-111-0/+52
| | | | | | GVfsDnsSdResolver doesn't store interface for the resolved service, however, we need this for link-local address support. Let's add the missing bits for it.
* Fix compilationOndrej Holy2017-01-101-1/+1
| | | | | | | | Commit 8f86396 has been pushed recently, but long time after review and another change was made in the meantime, which causes compilation failures currently. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* Remove some leftover dead codeChristian Kellner2017-01-091-4/+1
| | | | | | | Porting from GSimpleAsyncResult to GTask resulted in a tiny amount of dead code. Remove that. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* dnssd: Return error instead of abortOndrej Holy2016-12-121-0/+8
| | | | | | | | gvfsd-dnssd aborts currently if invalid encoded triple is provided and g_vfs_dns_sd_resolver_resolve is called. Return error instead of abort. https://bugzilla.gnome.org/show_bug.cgi?id=772849
* common: Port GVfsDnsSdResolver to GTaskOndrej Holy2016-10-261-54/+40
| | | | | | GSimpleAsyncResult is deprecated in favour of GTask and should be replaced. https://bugzilla.gnome.org/show_bug.cgi?id=747412
* Use Unicode in translatable stringsPiotr Drąg2016-10-031-4/+4
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772219
* dnssd: Run GSimpleAsyncResult completion in idleRoss Lagerwall2015-03-141-4/+4
| | | | | | | | | | | | g_simple_async_result_complete should only be used from the thread on which the callback should be invoked. Also, the gvfs job threads do not have their own GMainContexts which causes an assertion failure [1] when invoking g_simple_async_result_complete. Instead, use g_simple_async_result_complete_in_idle(). [1] (process:11772): GLib-CRITICAL **: g_main_context_push_thread_default: assertion 'acquired_context' failed https://bugzilla.gnome.org/show_bug.cgi?id=629345
* dnssd: Remove recursive main loopRoss Lagerwall2015-03-141-15/+16
| | | | | | | Don't run a recursive main loop on a separate thread with a shared GMainContext. https://bugzilla.gnome.org/show_bug.cgi?id=629345
* dnssd: Prevent crash when resolving serviceRoss Lagerwall2015-03-141-39/+19
| | | | | | | | | | | | | | | AvahiClient appears to require that avahi_service_resolver_new is invoked from the same thread to which its poll function is bound otherwise it can crash with a callback running while avahi_service_resolver_new is still busy. To fix this, always run avahi_service_resolver_new from the main loop. To simplify the code, any errors from the function are ignored for now. This crash could be reproduced 100% of the time by trying to mount dav+sd (via gnome-user-share) in a single-CPU VM. https://bugzilla.gnome.org/show_bug.cgi?id=629345
* Update the Address of the FSFFelix Möller2012-07-301-2/+2
| | | | | | | | | | | | | | | Updating the address of the FSF. This has been done by: while read file; do sed -i 's:59 Temple Place:51 Franklin Street:' $file sed -i 's:Suite 330:Fifth Floor:' $file sed -i 's:02111-1307:02110-1301:' $file done https://bugzilla.gnome.org/show_bug.cgi?id=656598 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
* Avoid deadlock when pulling resolved dns-sd record from cacheTomas Bzatek2009-08-181-2/+11
| | | | | | | | | | When the host has already been resolved and is present in cache, it's returned immediately. But we always started a mainloop resulting in endless waiting for an event which had been received before that. This applies for the sync call. This is just a workaround, the sync code should be ported over avahi. See bug 555436 (comments 30-32) for details.
* Bug 569712 – Write comments for translators!Alexander Larsson2009-03-021-9/+9
| | | | | | | | | | | | | 2009-03-02 Alexander Larsson <alexl@redhat.com> Bug 569712 – Write comments for translators! * common/gvfsdnssdresolver.c (service_resolver_timed_out): Fix position of translator comments. svn path=/trunk/; revision=2271
* Bug 569712 – Write comments for translators!Alexander Larsson2009-03-021-0/+16
| | | | | | | | | | | | | | 2009-03-02 Alexander Larsson <alexl@redhat.com> Bug 569712 – Write comments for translators! * common/gvfsdnssdresolver.c: Add some translator comments. Patch from David Planella svn path=/trunk/; revision=2265
* Added. Added. Added. Added.Alexander Larsson2008-12-011-0/+1253
2008-12-01 Alexander Larsson <alexl@redhat.com> * common/Makefile.am: * common/gvfsdnssdresolver.c: Added. * common/gvfsdnssdresolver.h: Added. * common/gvfsdnssdutils.c: Added. * common/gvfsdnssdutils.h: Added. * daemon/Makefile.am: * daemon/dav+sd.mount.in: Added. * daemon/dav.mount.in: * daemon/gvfsbackenddav.c: * daemon/gvfsbackenddnssd.c: * daemon/gvfsbackendnetwork.c: For references to dns-sd dav services, use a dav+sd: uri, since this is stable over e.g. port changes and as such work better in e.g. bookmarks. Patch from David Zeuthen (#555436) svn path=/trunk/; revision=2112