1 === modified file 'src/location-geoclue.c'
2 --- src/location-geoclue.c 2011-03-27 22:14:58 +0000
3 +++ src/location-geoclue.c 2011-07-12 20:30:30 +0000
6 location_geoclue_start(location_geoclue_state_t *state)
8 - GeoclueMaster *master = NULL;
9 - GeoclueMasterClient *client = NULL;
10 - GError *error = NULL;
12 + if (state->provider && state->provider_path) {
13 + state->position = geoclue_position_new(state->provider,
14 + state->provider_path);
16 + GeoclueMaster *master = geoclue_master_get_default();
17 + GeoclueMasterClient *client = geoclue_master_create_client(master,
19 + GError *error = NULL;
21 - if (!(state->provider && state->provider_path)) {
22 - master = geoclue_master_get_default();
23 - client = geoclue_master_create_client(master, NULL, NULL);
24 + if (client == NULL) {
25 + g_printerr(_("Unable to obtain master client.\n"));
26 + g_object_unref(master);
30 if (!geoclue_master_client_set_requirements(client,
31 GEOCLUE_ACCURACY_LEVEL_REGION,
35 g_object_unref(client);
36 + g_object_unref(master);
41 state->position = geoclue_master_client_create_position(client, NULL);
43 - state->position = geoclue_position_new(state->provider,
44 - state->provider_path);
47 + g_object_unref(client);
48 + g_object_unref(master);
53 if (geoclue_provider_get_provider_info(GEOCLUE_PROVIDER(state->position),