summaryrefslogtreecommitdiff
path: root/libgdm/gdm-client.c
Commit message (Collapse)AuthorAgeFilesLines
* gdm-client: Remove dead codeAlessandro Bono2022-10-271-2/+0
| | | | 'client' is unused.
* libgdm: Track reauth user verifier toowip/more-gdm-client-fixesRay Strode2020-11-121-3/+18
| | | | | | | | The unlock screen may have user verifier extensions too, so we need to track the reauth user verifier, too. This API is clearly less than optimal, but fixing it is a task for another day.
* libgdm: use g_set_weak_pointer instead of g_object_add_weak_pointerRay Strode2020-11-121-90/+42
| | | | This makes the code much tidier.
* libgdm: Fix typo where user data is grabbed from wrong placeRay Strode2020-11-121-1/+1
| | | | | | | | | | Since commit 2615fb4ffe05b2640c15f4a9706796fe3b1376a9 user verifier extensions are stored as user data on the user verifier object. Unfortunately that commit, mixed up where the user verifier object was in place. This commit fixes that.
* libgdm: Don't leak user verifier extensions on unlockwip/libgdm-proxy-leaksRay Strode2020-11-031-22/+48
| | | | | | | | | GdmClient fails to free the hash table associated with user verifier extensions when the client is done with the user verifier. This commit ties the user verifier extensions to the user verifier instance associated with it, instead of storing the extensions directly in the client struct.
* libgdm: Fetch connection synchronouslyRay Strode2020-11-031-85/+9
| | | | | | | | | | | There's a race condition in the client connection code at the moment, where a user verifier could be waiting for its connection when the login screen asks for a greeter synchronously. The greeter will then end up with a different connection that the user verifier which breaks expectations. This commit just makes the connection fetching code synchronous for now to side step the problem.
* libgdm: Fix client leaks from g_async_result_get_source_objectRay Strode2020-11-031-3/+3
| | | | | | | | There are are few places in the code where the client object is retrieved via g_async_result_get_source_object. Those calls return a fresh reference that is never unreferenced later. This commit plugs those leaks by using g_autoptr's
* client: use G_DECLARE_FINAL_TYPENiels De Graef2018-12-231-115/+108
| | | | This also gets rid of the deprecated `g_type_class_add_private()`
* libgdm: use g_autoptr to manage objects lifecycleMarco Trevisan (Treviño)2018-06-121-153/+111
| | | | | Using auto pointers allows to manage things in a cleaner way without having to manually unref things before returning.
* libgdm: Return NULL on invalid client instancesMarco Trevisan (Treviño)2018-06-041-8/+8
|
* libgdm: Don't save manager addressMarco Trevisan (Treviño)2018-06-021-15/+9
| | | | | There's no need to keep the manager connection address around, and use autofree to clean it up
* libgdb: Try to reuse connections from the available proxiesMarco Trevisan (Treviño)2018-06-021-31/+39
| | | | | | | | | Instead of using the hard-to-maintain shared pointer to the dbus connection to the manager and reset it when the proxies that use it are deleted, just look which proxy is currently available and try to reuse the connection from it. Fixes #386
* libgdm: Use auto-pointers and cleanup codeMarco Trevisan (Treviño)2018-06-021-8/+5
|
* libgdm: Don't leak connection on sync re-authenticationMarco Trevisan (Treviño)2018-06-021-1/+1
|
* libgdm: Don't double-ref the connection got from taskMarco Trevisan (Treviño)2018-06-021-2/+2
| | | | | | | | Both if we re-use the shared connection in `gdm_client_get_connection` and if we create a new one in `on_connected`, we steal the pointer here by using `g_task_propagate_pointer` and thus we don't have to add an additional reference to this connection when returning, or it won't ever be consumed by function customers.
* libgdm: Unref the manager propagated from taskMarco Trevisan (Treviño)2018-06-021-1/+3
| | | | | | | | | This instance has already been reffed when passed to the task, and since we're stealing it with `g_task_propagate_pointer` it won't be unreffed. We could also do this in the `on_reauthentication_channel_opened` callback but since the new task will ref it anyway, we can just be clean and do it here.
* libgdm: Drop weak refs on the GDBusConnectionIain Lane2018-05-161-47/+0
| | | | | | | | | The GDBusProxies hold a strong reference to the connection themselves, so maintaining separate weak references is unnecessary. This commit drops those extraneous weak references. https://bugzilla.gnome.org/show_bug.cgi?id=795940
* libgdm: get connection explicitlyMarco Trevisan (Treviño)2018-05-161-54/+82
| | | | | | | | | | | At the moment we call gdm_client_open_connection and when it finishes, assume client->priv->connection is implicitly initialized. This commit makes the operation more explicit by changing gdm_client_open_connection to gdm_client_get_connection and returning the GDBusConnection object directly, instead of returning a boolean. https://bugzilla.gnome.org/show_bug.cgi?id=795940
* libgdm: use g_object_unref instead of g_clear_object for weakrefsRay Strode2018-05-161-8/+8
| | | | | | | | | | | At the moment we add a weakref on each proxy to the connection object. For the _sync variant functions, When the weakref fires, they call g_clear_object, clearing the connection, even if other proxies still have a reference. This commit changes that weak ref code to use g_object_unref instead. https://bugzilla.gnome.org/show_bug.cgi?id=795940
* libgdm: don't keep manager proxy around longer than we need itRay Strode2018-05-161-93/+26
| | | | | | | | | | | | Right now we keep the manager proxy alive long after we need it. It doesn't get cleared until one of the other proxies go away. That is not only unnecessary but illogical and confusing. This commit changes the manager proxy to be transient—only alive long enough to get what we need from it. https://bugzilla.gnome.org/show_bug.cgi?id=795940
* libgdm: fix pointer/boolean task confusionRay Strode2018-05-161-2/+6
| | | | | | | | | The manager fetching code in GdmClient treats its task return value as boolean, but it's actually a pointer (the manager) This commit corrects the confusion. https://bugzilla.gnome.org/show_bug.cgi?id=795940
* libgdm: drop support for serializing multiple opensRay Strode2018-05-161-71/+40
| | | | | | | | | | | | | | | | | | Right now libgdm tries to handle multiple simultaneous open calls at the same time by serializing the requests and giving them all the same connection. It's broken, though. - The pending_opens list is never populated, so we end up just doing multiple simultaneous open operations at a time anyway. - The finish code ends up calling g_task_return_error (task, NULL) instead of g_task_return_pointer in the non-error case. Since the feature doesn't work, drop it for now. https://bugzilla.gnome.org/show_bug.cgi?id=795940
* libgdm: add weak pointer for connection objectMarco Trevisan (Treviño)2018-05-161-0/+12
| | | | | | | | | At the moment we fail to nullify GdmClient's connection to GDM when the connection is disposed. This commit adds a weak pointer to correct that mistake. https://bugzilla.gnome.org/show_bug.cgi?id=795940
* libgdm: Don't unref a connection that's in useMarco Trevisan (Treviño)2018-05-161-0/+2
| | | | | | | | | | | | | If an async task tries to reuse an open connection, it erroneously explicitly unrefs it. That is incorrect, because there are weak references in use to handle disposing the connection when its no longer in use. This commit makes sure the local connection object in open_connection is nullified so the connection doesn't get autofree'd. https://bugzilla.gnome.org/show_bug.cgi?id=795940
* Replace deprecated GSimpleAsyncResult with GTaskRobert Ancell2017-12-141-296/+235
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=783082
* libgdm: add api for getting at ChoiceList interfaceRay Strode2017-10-201-2/+214
| | | | | | This provides gnome-shell with a way to use the new interface. https://bugzilla.gnome.org/show_bug.cgi?id=788851
* Don't leak result of g_dbus_connection_new_for_address_finish()Owen W. Taylor2014-10-091-5/+10
| | | | | | | | g_dbus_connection_new_for_address_finish() returns a new reference; we can't simply ignore the returned connection, even though it is also passed in as the source object of the GAsyncReadyCallback. https://bugzilla.gnome.org/show_bug.cgi?id=738246
* Unref result of g_async_result_get_source_object()Owen W. Taylor2014-10-091-0/+3
| | | | | | | g_async_result_get_source_object() returns a reference that must be unreferenced. https://bugzilla.gnome.org/show_bug.cgi?id=738246
* Unref async results after calling g_simple_async_result_complete_in_idle()Owen W. Taylor2014-10-091-0/+26
| | | | | | | All async results were leaked, since g_simple_async_result_complete_in_idle() takes a new reference rather than assuming the ref passed in. https://bugzilla.gnome.org/show_bug.cgi?id=738246
* manager: close up timed login raceRay Strode2014-06-051-0/+24
| | | | | | | | | | | | Previously we would emit the timed-login-requested signal after the client connects, which might be before it was listening for the signal. Now we only emit the signal in direct response to a GetTimedLoginDetails call, which we make implicitly when the appropiate proxy interface is set up. https://bugzilla.gnome.org/show_bug.cgi?id=680348
* libgdm: move out of gui/ directoryRay Strode2013-12-161-0/+1445
libgdm isn't a UI, so it's weird to be in a directory called GUI. This commit moves it up a layer.