1. 09 Apr, 2021 1 commit
  2. 08 Apr, 2021 1 commit
  3. 25 Feb, 2021 1 commit
  4. 18 Feb, 2021 9 commits
  5. 16 May, 2020 1 commit
  6. 24 Jul, 2019 3 commits
  7. 22 Jul, 2017 2 commits
  8. 20 Apr, 2015 1 commit
    • Luiz Augusto von Dentz's avatar
      gdbus: Close private connection if setup fails · bfdce916
      Luiz Augusto von Dentz authored
      Private connection should be properly closed with dbus_connection_close
      otherwise libdbus exits with the following error:
      
        'The last reference on a connection was dropped without closing the
         connection. This is a bug in an application. See
         dbus_connection_unref() documentation for details. Most likely, the
         application was supposed to call dbus_connection_close(), since this
         is a private connection.'
      bfdce916
  9. 09 Apr, 2015 2 commits
  10. 07 Apr, 2015 1 commit
  11. 26 Mar, 2015 3 commits
    • Luiz Augusto von Dentz's avatar
      gdbus: Make GDBusClient work without ObjectManager · af5acc9b
      Luiz Augusto von Dentz authored
      This makes GDBusClient work normally without ObjectManager.
      af5acc9b
    • Arman Uguray's avatar
      gdbus/client: Allow specifying ObjectManager path · d0bf7e57
      Arman Uguray authored
      GDBusClient currently hard-codes "/" as the remote ObjectManager path.
      This is generally incorrect, as an application can choose to expose an
      ObjectManager at any well-known path. This patch fixes this by allowing
      the user to pass in the ObjectManager path by introducing a new
      conctructor "g_dbus_client_new_full".
      d0bf7e57
    • Arman Uguray's avatar
      gdbus/client: Don't GetManagedObjects w/o handlers · 1545d48b
      Arman Uguray authored
      The client code currently issues GetManagedObjects if new handlers are
      set via g_dbus_client_set_proxy_handlers. An application may set these
      to NULL before unref'ing a client or to simply prevent further events.
      Hence, there is no need to refresh objects or properties if all handlers
      are NULL.
      1545d48b
  12. 24 Feb, 2015 1 commit
    • Szymon Janc's avatar
      gdbus: Fix not calling disconnect function · b93b6037
      Szymon Janc authored
      If daemon gets disconnected from D-Bus sender is NULL. Watches that
      was explicitly added with NULL sender (ie disconnected_signal in
      g_dbus_set_disconnect_function) should be called anyway.
      b93b6037
  13. 22 Feb, 2015 1 commit
    • Arman Uguray's avatar
      gdbus: Don't refresh objects/props if disconnected · 61c0467e
      Arman Uguray authored
      If g_dbus_client_set_proxy_handlers gets called from within a
      proxy_removed callback, the code may end up refreshing the proxy's
      properties and incorrectly access the client's proxy_list as it gets
      freed. This patch fixes this, so that get_managed_objects does nothing
      if it gets called during a service disconnect.
      61c0467e
  14. 15 Sep, 2014 1 commit
    • Alban Crequy's avatar
      gdbus: Fix match rule for NameOwnerChanged · 06acadd1
      Alban Crequy authored
      When subscribing to the D-Bus signal NameOwnerChanged from the bus driver,
      specify the object path and the sender in the match rule. Otherwise, random
      connections on the bus could impersonate the bus driver.
      06acadd1
  15. 08 Sep, 2014 5 commits
    • Luiz Augusto von Dentz's avatar
      gdbus: Fix crash when watch is toggled or disconnected · 3112f9b7
      Luiz Augusto von Dentz authored
      This partially reverts 510b32b7156625b9df737c916b7a7a5c6fb285b9 since it
      still necessary to take a reference before calling dbus_watch_handle
      since internally it can call watch_info_free as in the following trace:
      
       Invalid read of size 8
         at 0x121085: watch_func (mainloop.c:105)
         by 0x4C72694: g_main_context_dispatch (gmain.c:2539)
         by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146)
         by 0x4C72DC1: g_main_loop_run (gmain.c:3340)
         by 0x120541: main (main.c:551)
       Address 0x5bbcd90 is 16 bytes inside a block of size 24 free'd
         at 0x4A079AE: free (vg_replace_malloc.c:427)
         by 0x4C7837E: g_free (gmem.c:252)
         by 0x4F708BF: dbus_watch_set_data (dbus-watch.c:614)
         by 0x4F70938: _dbus_watch_unref (dbus-watch.c:132)
         by 0x4F6E9A7: _dbus_transport_handle_watch (dbus-transport.c:884)
         by 0x4F59AFB: _dbus_connection_handle_watch (dbus-connection.c:1497)
         by 0x4F70AF9: dbus_watch_handle (dbus-watch.c:683)
         by 0x121084: watch_func (mainloop.c:103)
         by 0x4C72694: g_main_context_dispatch (gmain.c:2539)
         by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146)
         by 0x4C72DC1: g_main_loop_run (gmain.c:3340)
         by 0x120541: main (main.c:551)
      3112f9b7
    • Luiz Augusto von Dentz's avatar
      gdbus: Fix crash when calling g_dbus_add_service_watch · 7ab29db8
      Luiz Augusto von Dentz authored
      If g_dbus_add_service_watch is called for service which bus name is
      already known the following crash can happen:
      
      invalid read of size 1
        at 0x4C2A2F2: strlen (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
        by 0x4E97722: g_strdup (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x405B0C: update_name_cache (watch.c:435)
        by 0x405C37: update_service (watch.c:593)
        by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x4038EA: client_ready (test-gdbus-client.c:1014)
        by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x403614: main (test-gdbus-client.c:1058)
      Address 0x5dbe5d0 is 0 bytes inside a block of size 7 free'd
        at 0x4C28577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
        by 0x4E7FF7E: g_free (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x405B04: update_name_cache (watch.c:434)
        by 0x405C37: update_service (watch.c:593)
        by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x4038EA: client_ready (test-gdbus-client.c:1014)
        by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2)
        by 0x403614: main (test-gdbus-client.c:1058)
      7ab29db8
    • Luiz Augusto von Dentz's avatar
      Revert "gdbus: Don't include just added interfaces in GetManagedObjects" · 3bfd0ea0
      Luiz Augusto von Dentz authored
      This actually creates a problem since the code now does flush any pending
      message on the queue any signal will be send right away before the
      actual reply to GetManagedObjects which will not contain those interfaces.
      3bfd0ea0
    • Andrei Emeltchenko's avatar
      gdbus: Fix use after free · 74f3c3a3
      Andrei Emeltchenko authored
      Refactor filter_data_remove_callback so that we do not iterate over
      freed pointer.
      74f3c3a3
    • Claudio Takahasi's avatar
      gdbus: Avoid reporting GDBusClient disconnect twice · 29e7eb4e
      Claudio Takahasi authored
      No matter if disconnection was reported previously, g_dbus_client_unref()
      was always calling service disconnect callback. This patch fix the
      following scenario:
      1) service disconnects from the bus
      2) disconnect callback gets called
      3) client calls g_dbus_client_unref(), disconnect callback is called
         again.
      29e7eb4e
  16. 24 Mar, 2014 1 commit
  17. 06 Mar, 2014 1 commit
  18. 19 Feb, 2014 3 commits
    • Luiz Augusto von Dentz's avatar
      gdbus: Replace g_timeout_add with g_idle_add · 85986112
      Luiz Augusto von Dentz authored
      Passing 0 as timeout to g_timeout_add should equivalent to g_idle_add.
      85986112
    • Anderson Lizardo's avatar
      gdbus: Fix incorrect DBusConnection reference counting · 0b2e4b1d
      Anderson Lizardo authored
      Commit abfc2b0dd5c3e33abfdf1a815b16d492c1751c06 attempted to fix a crash
      related to improper reference counting, but the main issue was that the
      reference was taken only during the function call (which is usually
      unnecessary for single thread), but still passed a pointer to
      DBusConnection to a function that is called by the mainloop. This left a
      window where the DBusConnection can be destroyed.
      
      Fixes this crash on unit/test-gdbus-client:
      
      ==32642== Invalid read of size 4
      ==32642==    at 0x690D0A6: dbus_connection_ref (in
      /lib/i386-linux-gnu/libdbus-1.so.3.7.6)
      ==32642==    by 0x804CEDB: message_dispatch (mainloop.c:73)
      ==32642==    by 0x684580E: g_timeout_dispatch (gmain.c:4450)
      ==32642==    by 0x6844A75: g_main_context_dispatch (gmain.c:3065)
      ==32642==    by 0x6844E14: g_main_context_iterate.isra.23 (gmain.c:3712)
      ==32642==    by 0x68452FA: g_main_loop_run (gmain.c:3906)
      ==32642==    by 0x804C7D3: client_connect_disconnect
      (test-gdbus-client.c:188)
      ==32642==    by 0x6868DB2: g_test_run_suite_internal (gtestutils.c:2067)
      ==32642==    by 0x6868F8D: g_test_run_suite_internal (gtestutils.c:2138)
      ==32642==    by 0x6869320: g_test_run_suite (gtestutils.c:2189)
      ==32642==    by 0x686936B: g_test_run (gtestutils.c:1508)
      ==32642==    by 0x696D4D2: (below main) (libc-start.c:226)
      ==32642==  Address 0x709c6e4 is 140 bytes inside a block of size 144
      free'd
      ==32642==    at 0x67E806C: free (in
      /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
      ==32642==    by 0x692D62E: dbus_free (in
      /lib/i386-linux-gnu/libdbus-1.so.3.7.6)
      ==32642==    by 0x690E1C2: ??? (in
      /lib/i386-linux-gnu/libdbus-1.so.3.7.6)
      ==32642==    by 0x804AAEC: destroy_context (test-gdbus-client.c:104)
      ==32642==    by 0x6868DB2: g_test_run_suite_internal (gtestutils.c:2067)
      ==32642==    by 0x6868F8D: g_test_run_suite_internal (gtestutils.c:2138)
      ==32642==    by 0x6869320: g_test_run_suite (gtestutils.c:2189)
      ==32642==    by 0x686936B: g_test_run (gtestutils.c:1508)
      ==32642==    by 0x696D4D2: (below main) (libc-start.c:226)
      0b2e4b1d
    • Anderson Lizardo's avatar
      gdbus: Fix memory leak · aa1aea88
      Anderson Lizardo authored
      data->conn and data->path must be destroyed before freeing "data".
      aa1aea88
  19. 11 Nov, 2013 1 commit
  20. 14 Oct, 2013 1 commit