~ubuntu-branches/ubuntu/utopic/ofono/utopic-proposed

« back to all changes in this revision

Viewing changes to gril/gril.c

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Jussi Kangas, Tony Espy, Ubuntu daily release
  • Date: 2014-09-04 22:31:59 UTC
  • mfrom: (1.3.25)
  • Revision ID: package-import@ubuntu.com-20140904223159-o4zgzipoyz0ejmlt
Tags: 1.12.bzr6876+14.10.20140904-0ubuntu1
[ Jussi Kangas ]
* src/gprs.c: Fix to allow MMS properties to be set (LP: #1362068)

[ Tony Espy ]
* rilmodem/sim.c: Fix EnterPIN logic (LP: #1363413)

[ Ubuntu daily release ]
* New rebuild forced

Show diffs side-by-side

added added

removed removed

Lines of Context:
319
319
{
320
320
        /* Cleanup pending commands */
321
321
 
322
 
        g_queue_free(p->command_queue);
323
 
        p->command_queue = NULL;
324
 
        g_queue_free(p->out_queue);
325
 
        p->out_queue = NULL;
 
322
        if (p->command_queue) {
 
323
                g_queue_free(p->command_queue);
 
324
                p->command_queue = NULL;
 
325
        }
 
326
 
 
327
        if (p->out_queue) {
 
328
                g_queue_free(p->out_queue);
 
329
                p->out_queue = NULL;
 
330
        }
326
331
 
327
332
        /* Cleanup registered notifications */
328
 
        if (p->notify_list)
 
333
        if (p->notify_list) {
329
334
                g_hash_table_destroy(p->notify_list);
330
 
 
331
 
        p->notify_list = NULL;
 
335
                p->notify_list = NULL;
 
336
        }
332
337
 
333
338
        if (p->timeout_source) {
334
339
                g_source_remove(p->timeout_source);
867
872
        if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
868
873
                ofono_error("create_ril: can't connect to RILD: %s (%d)\n",
869
874
                                strerror(errno), errno);
 
875
                /* Switch back to root */
 
876
                set_process_id(0, 0);
870
877
                goto error;
871
878
        }
872
879
 
875
882
 
876
883
        io = g_io_channel_unix_new(sk);
877
884
        if (io == NULL) {
878
 
                ofono_error("create_ril: can't connect to RILD: %s (%d)\n",
 
885
                ofono_error("create_ril: can't open RILD io channel: %s (%d)\n",
879
886
                                strerror(errno), errno);
880
 
                return NULL;
 
887
                goto error;
881
888
        }
882
889
 
883
890
        g_io_channel_set_close_on_unref(io, TRUE);
912
919
        return ril;
913
920
 
914
921
error:
915
 
        ofono_error("Exiting...");
916
 
        exit(EXIT_FAILURE);
 
922
        ril_unref(ril);
 
923
 
 
924
        return NULL;
917
925
}
918
926
 
919
927
static struct ril_notify *ril_notify_create(struct ril_s *ril,