~azzar1/snapd-glib-fork/glib-2-40

« back to all changes in this revision

Viewing changes to snapd-glib/snapd-client.c

  • Committer: Robert Ancell
  • Date: 2016-08-31 10:06:42 UTC
  • Revision ID: git-v1:5eb893ead8f86500d2d05320fa0c008011d99e32
Use better method for determining main context to wait on

Show diffs side-by-side

added added

removed removed

Lines of Context:
385
385
static void
386
386
snapd_request_wait (SnapdRequest *request)
387
387
{
 
388
    SnapdClientPrivate *priv = snapd_client_get_instance_private (request->client);
 
389
    GMainContext *context = g_source_get_context (priv->read_source);
 
390
 
388
391
    while (!request->completed)
389
 
       g_main_context_iteration (g_main_context_default (), TRUE);
 
392
        g_main_context_iteration (context, TRUE);
390
393
}
391
394
 
392
395
static gboolean