~ubuntu-branches/ubuntu/lucid/hal/lucid-proposed

« back to all changes in this revision

Viewing changes to hald/hald_runner.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-12-03 01:21:24 UTC
  • mto: (1.1.18 squeeze)
  • mto: This revision was merged to the branch mainline in revision 165.
  • Revision ID: james.westby@ubuntu.com-20091203012124-3573qknop973uvc2
Tags: upstream-0.5.14
ImportĀ upstreamĀ versionĀ 0.5.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
                                        break;
141
141
                                }
142
142
                        }
 
143
                } else {
 
144
                        dbus_error_free (&error);
143
145
                }
144
146
        } else if (dbus_message_is_signal (message,
145
147
                                           DBUS_INTERFACE_LOCAL,
255
257
        dbus_error_init (&err);
256
258
        runner_server = dbus_server_listen (DBUS_SERVER_ADDRESS, &err);
257
259
        if (runner_server == NULL) {
258
 
                HAL_ERROR (("Cannot create D-BUS server for the runner"));
 
260
                HAL_ERROR (("Cannot create D-BUS server for the runner: %s:%s", err.name, err.message));
 
261
                dbus_error_free (&err);
259
262
                goto error;
260
263
        }
261
264
 
402
405
                        GSList *j;
403
406
                        CKSeat *seat;
404
407
                        GSList *sessions;
405
 
                        const char *seat_id;
 
408
                        char *seat_id;
406
409
                        GString *sessions_string;
407
410
                        int num_sessions;
408
411
 
424
427
                        num_sessions_total += num_sessions;
425
428
                        for (j = sessions; j != NULL; j = g_slist_next (j)) {
426
429
                                CKSession *session;
427
 
                                const char *session_id;
 
430
                                char *session_id;
428
431
                                const char *q;
429
432
 
430
433
                                session = j->data;
464
467
                                        add_env (iter, s, q);
465
468
                                        g_free (s);
466
469
                                }
 
470
                                g_free (session_id);
467
471
                        }
468
472
 
469
473
                        /* for each Seat, export sessions on each seat 
481
485
                        add_env (iter, s, p);
482
486
                        g_free (p);
483
487
                        g_free (s);
 
488
                        g_free (seat_id);
484
489
 
485
490
                }
486
491
 
626
631
        }
627
632
 
628
633
        /* Wait for the reply, should be almost instantanious */
629
 
        reply =
630
 
            dbus_connection_send_with_reply_and_block (runner_connection,
631
 
                                                       msg, -1, &error);
 
634
        reply = dbus_connection_send_with_reply_and_block (runner_connection,
 
635
                                                           msg, -1, &error);
632
636
        if (reply) {
633
637
                gboolean ret =
634
638
                    (dbus_message_get_type (reply) ==
660
664
                                }
661
665
                        } else {
662
666
                                HAL_ERROR (("Error extracting out_pid from runner's Start()"));
 
667
                                dbus_error_free (&error);
663
668
                        }
664
669
                }
665
670
 
669
674
        } else {
670
675
                if (dbus_error_is_set (&error)) {
671
676
                        HAL_ERROR (("Error running '%s': %s: %s", command_line, error.name, error.message));
 
677
                        dbus_error_free (&error);
672
678
                }
673
679
        }
674
680
 
675
 
      error:
 
681
error:
676
682
        dbus_message_unref (msg);
677
683
        return FALSE;
678
684
}
880
886
        if (reply == NULL) {
881
887
                if (dbus_error_is_set (&error)) {
882
888
                        HAL_ERROR (("Error running '%s': %s: %s", command_line, error.name, error.message));
 
889
                        dbus_error_free (&error);
883
890
                }
884
891
                goto error;
885
892
        }
927
934
 
928
935
        /* Wait for the reply, should be almost instantanious */
929
936
        dbus_error_init (&err);
930
 
        reply =
931
 
            dbus_connection_send_with_reply_and_block (runner_connection,
932
 
                                                       msg, -1, &err);
 
937
        reply = dbus_connection_send_with_reply_and_block (runner_connection,
 
938
                                                           msg, -1, &err);
933
939
        if (reply) {
934
940
                dbus_message_unref (reply);
 
941
        } else {
 
942
                dbus_error_free (&err);
935
943
        }
936
944
 
937
945
        dbus_message_unref (msg);
957
965
                                                       msg, -1, &err);
958
966
        if (reply) {
959
967
                dbus_message_unref (reply);
 
968
        } else {
 
969
                dbus_error_free (&err);
960
970
        }
961
971
 
962
972
        dbus_message_unref (msg);