~lightdm-team/lightdm/1.4

« back to all changes in this revision

Viewing changes to tests/src/status.c

  • Committer: Robert Ancell
  • Date: 2013-08-22 03:18:34 UTC
  • Revision ID: robert.ancell@canonical.com-20130822031834-50l2i7tedbs1lre3
Backport test improvements from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    return TRUE;
42
42
}
43
43
 
44
 
void
 
44
gboolean
45
45
status_connect (StatusRequestFunc request_cb)
46
46
{
47
47
    gchar *path;
57
57
        g_printerr ("Unable to open socket for status: %s\n", error->message);
58
58
    g_clear_error (&error);
59
59
    if (!status_socket)
60
 
        return;
 
60
        return FALSE;
61
61
 
62
62
    path = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), ".s", NULL);
63
63
    address = g_unix_socket_address_new (path);
68
68
    g_clear_error (&error);
69
69
    g_free (path);
70
70
    if (!result)
71
 
        return;
 
71
        return FALSE;
72
72
 
73
73
    source = g_socket_create_source (status_socket, G_IO_IN, NULL);
74
74
    g_source_set_callback (source, (GSourceFunc) status_request_cb, NULL, NULL);
75
 
    g_source_attach (source, NULL);   
 
75
    g_source_attach (source, NULL);
 
76
 
 
77
    return TRUE;
76
78
}
77
79
 
78
80
void