1. 05 Oct, 2011 1 commit
  2. 17 Aug, 2011 1 commit
  3. 15 Aug, 2011 4 commits
    • Simon McVittie's avatar
      GDBusProxy: hold properties_lock while using any mutable property · 85214d1e
      Simon McVittie authored
      This changes the meaning of "properties_lock" from "lock for D-Bus
      properties" to "lock for GObject properties".
      
      The most common problem, and the only one I've reproduced in a regression
      test, is name_owner, which can be updated by the thread that owns
      the GDBusProxy's main context (i.e. the thread-default main context of
      the thread that constructed it) at the same time that a blocking call
      is made. When a GDBusProxy is constructed in a thread-pool thread for
      short-term use, the main context will typically be the global default
      main context (which is actively running in the main thread!), making
      this extremely problematic.
      
      The interface info is perhaps a theoretical concern - one thread could
      conceivably set it at the same time that another thread uses it, but only
      in relatively pathological situations. The current API for this does have
      the problem that it returns a borrowed ref, but interface info is
      hopefully permanent anyway.
      
      The default timeout is probably only a theoretical concern - it's just an
      int, so writes are indivisible, and there's no worry about whether
      something has been freed - but to be safe, let's hold the lock for that
      too.
      
      Bug: https://bugzilla.gnome.org/show_bug.cgi?id=656039
      Bug-NB: NB#259760
      Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
      85214d1e
    • Simon McVittie's avatar
      GDBusProxy: factor out async_init_data_set_name_owner · 5909cb10
      Simon McVittie authored
      This removes the need for async_init_get_name_owner_cb to cope with being
      called without a real GAsyncResult, and will simplify the addition of
      correct thread-locking.
      
      In async_init_data_set_name_owner, use the name_owner parameter instead
      of the corresponding member of GDBusProxyPrivate, partly to reduce
      pointer-chasing but mainly to avoid needing to hold the lock.
      Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
      5909cb10
    • Simon McVittie's avatar
      g_dbus_proxy_get_property: use accessors for all mutable state · 03ae974f
      Simon McVittie authored
      These ought to have thread-locking, and having it in the accessor seems
      better than duplicating it here.
      Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
      03ae974f
    • Simon McVittie's avatar
      GDBusProxy: if a well-known name is not owned, don't GetAll from the dbus-daemon · 20387d26
      Simon McVittie authored
      If you run:
      
          ( cd gio/tests && G_DBUS_DEBUG=all ./gdbus-proxy-well-known-name )
      
      you can see that in the case where the name com.example.TestService isn't
      owned yet, the GDBusProxy calls GetAll() with no destination, resulting
      in an error reply from the peer (the dbus-daemon itself). That's clearly
      not right!
      
      However, if priv->name is NULL, that indicates the special case where we
      really do want to talk directly to a peer, instead of via the bus daemon
      (most likely to be used on peer-to-peer connections); in that special
      case, do call GetAll().
      Signed-off-by: Simon McVittie's avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
      Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
      20387d26
  4. 13 Aug, 2011 1 commit
    • Matthias Clasen's avatar
      GDBusProxy: on_properties_changed initialize some variables · ae496a52
      Matthias Clasen authored
      This avoids calling g_variant_unref and g_free on uninitialized memory
      if PropertiesChanged is received in the creating thread's thread-default
      main context's thread, at the same time as releasing the last ref in
      another thread. This would result in "goto out" before the variables
      freed after that label had been initialized to NULL.
      
      Based on a patch by Simon McVittie, bug 656282
      ae496a52
  5. 11 Aug, 2011 1 commit
  6. 25 Jul, 2011 1 commit
  7. 21 Jul, 2011 1 commit
  8. 19 Jul, 2011 1 commit
  9. 20 Jun, 2011 1 commit
  10. 14 Jun, 2011 1 commit
  11. 26 May, 2011 4 commits
  12. 02 May, 2011 1 commit
  13. 27 Apr, 2011 1 commit
  14. 12 Apr, 2011 1 commit
  15. 08 Apr, 2011 4 commits
  16. 30 Mar, 2011 1 commit
  17. 28 Mar, 2011 4 commits
  18. 14 Mar, 2011 1 commit
  19. 03 Nov, 2010 1 commit
  20. 28 Oct, 2010 1 commit
  21. 24 Sep, 2010 1 commit
  22. 04 Sep, 2010 1 commit
  23. 30 Aug, 2010 2 commits
  24. 18 Aug, 2010 2 commits
  25. 03 Aug, 2010 1 commit
  26. 30 Jul, 2010 1 commit