~cyphermox/ubuntu/natty/ofono/release-0.41

« back to all changes in this revision

Viewing changes to plugins/nokia.c

  • Committer: Mathieu Trudel-Lapierre
  • Date: 2011-02-11 02:17:20 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: mathieu-tl@ubuntu.com-20110211021720-cvxc3erw1keomunj
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
        DBG("%p", modem);
63
63
 
64
64
        data = g_try_new0(struct nokia_data, 1);
65
 
        if (!data)
 
65
        if (data == NULL)
66
66
                return -ENOMEM;
67
67
 
68
68
        ofono_modem_set_data(modem, data);
106
106
        DBG("%s %s", key, device);
107
107
 
108
108
        channel = g_at_tty_open(device, NULL);
109
 
        if (!channel)
 
109
        if (channel == NULL)
110
110
                return NULL;
111
111
 
112
112
        syntax = g_at_syntax_new_gsm_permissive();
114
114
        g_at_syntax_unref(syntax);
115
115
        g_io_channel_unref(channel);
116
116
 
117
 
        if (!chat)
 
117
        if (chat == NULL)
118
118
                return NULL;
119
119
 
120
120
        if (getenv("OFONO_AT_DEBUG"))
137
137
        data->modem = NULL;
138
138
 
139
139
        data->modem = open_device(modem, "Modem", "Modem: ");
140
 
        if (!data->modem)
 
140
        if (data->modem == NULL)
141
141
                return;
142
142
 
143
143
        g_at_chat_set_disconnect_function(data->modem,
216
216
                data->modem = NULL;
217
217
        }
218
218
 
219
 
        if (!data->control)
 
219
        if (data->control == NULL)
220
220
                return 0;
221
221
 
222
222
        g_at_chat_cancel_all(data->control);