.setup_netif = hal_setup_netif,
};
-static TReturn prepare_and_send_at_request(TcoreHal *hal,
+static TReturn prepare_and_send_at_request(CoreObject *co, TcoreHal *hal,
const char *at_cmd,
const char *at_cmd_prefix,
enum tcore_at_command_type at_cmd_type,
TcoreATRequest *req;
/* Create Pending Request */
- pending = tcore_pending_new(NULL, 0);
+ pending = tcore_pending_new(co, 0);
if (pending == NULL) {
dbg("Memory failure, pending is NULL");
return TCORE_RETURN_ENOMEM;
}
/* Disable UART for power saving */
- prepare_and_send_at_request(hal, "AT+XPOW=0,0,0",
+ prepare_and_send_at_request(NULL, hal, "AT+XPOW=0,0,0",
NULL, TCORE_AT_NO_RESULT, NULL, hal);
dbg("Proceed with mux initialization");
if (flag == TRUE) {
tcore_server_register_modem(server, cdata->plugin);
- return prepare_and_send_at_request(hal,
+ return prepare_and_send_at_request(NULL, hal,
"AT+CPAS",
"+CPAS", TCORE_AT_SINGLELINE,
on_response_poweron, hal);
return TCORE_RETURN_FAILURE;
}
- if ((enable == FALSE) && (cdata->rawip_enabled == TRUE)) {
+ if ((enable == FALSE) && (cdata->rawip_enabled == FALSE)) {
dbg("PDP context %d already disabled", cid);
return TCORE_RETURN_SUCCESS;
}
cmd_str = g_strdup_printf("AT+CGDATA=\"M-RAW_IP\",%d", cid);
- ret = prepare_and_send_at_request(data_hal, cmd_str, NULL,
+ ret = prepare_and_send_at_request(co, data_hal, cmd_str, NULL,
TCORE_AT_NO_RESULT,
on_response_setup_pdp, data_hal);