DBG("modem %p %s", modem, online ? "online" : "offline");
- if (cbd == NULL || data->chat == NULL)
+ if (data->chat == NULL)
goto error;
if (g_at_chat_send(data->chat, command, NULL,
DBG("modem %p %s", modem, online ? "online" : "offline");
- if (cbd == NULL)
- goto error;
-
if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, cbd->data);
DBG("%p %s", modem, online ? "online" : "offline");
- if (cbd == NULL)
- goto error;
-
if (g_at_chat_send(data->dlcs[AUX_DLC], command, NULL,
set_online_cb, cbd, g_free) > 0)
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, cbd->data);
DBG("modem %p %s", modem, online ? "online" : "offline");
- if (cbd == NULL)
- goto error;
-
if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, cbd->data);
DBG("modem %p %s", modem, online ? "online" : "offline");
- if (cbd == NULL || chat == NULL)
+ if (chat == NULL)
goto error;
if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
struct cb_data *cbd = cb_data_new(cb, data);
char buf[128];
- if (cbd == NULL)
- goto error;
-
cbd->user = gc;
snprintf(buf, sizeof(buf), "AT+CGACT=0,%u", id);
at_cgact_down_cb, cbd, g_free) > 0)
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, data);
DBG("");
- if (!cbd)
- goto error;
-
if (g_at_chat_send(chat, "AT+PTTY?", ptty_prefix,
ctm_query_cb, cbd, g_free) > 0)
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, 0, data);
DBG("");
- if (!cbd)
- goto error;
-
snprintf(buf, sizeof(buf), "AT+PTTY=%d", enable);
if (g_at_chat_send(chat, buf, none_prefix,
ctm_set_cb, cbd, g_free) > 0)
return;
-error:
CALLBACK_WITH_FAILURE(cb, data);
g_free(cbd);
}
DBG("modem %p %s", modem, online ? "online" : "offline");
- if (cbd == NULL || data->chat == NULL)
+ if (data->chat == NULL)
goto error;
if (g_at_chat_send(data->chat, command, NULL,
DBG("modem %p %s", modem, online ? "online" : "offline");
- if (cbd == NULL)
- goto error;
-
if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, cbd->data);
DBG("modem %p %s", modem, online ? "online" : "offline");
- if (cbd == NULL)
- goto error;
-
if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))
return;
-error:
g_free(cbd);
CALLBACK_WITH_FAILURE(cb, cbd->data);
DBG("modem %p %s", modem, online ? "online" : "offline");
- if (cbd == NULL || chat == NULL)
+ if (chat == NULL)
goto error;
if (g_at_chat_send(chat, command, NULL, set_online_cb, cbd, g_free))