CALLBACK_WITH_SUCCESS(cb, cbd->data);
ussd_parse(cbd->user, data, len);
- goto out;
+ return TRUE;
error:
CALLBACK_WITH_FAILURE(cb, cbd->data);
-
-out:
- g_free(cbd);
return TRUE;
+
}
-static GIsiRequest *ussd_send_make(GIsiClient *client, uint8_t *str,
- size_t len, void *data)
+static GIsiRequest *ussd_send(GIsiClient *client,
+ uint8_t *str, size_t len,
+ void *data, GDestroyNotify notify)
{
const uint8_t msg[] = {
SS_GSM_USSD_SEND_REQ,
{ str, len }
};
- return g_isi_request_vmake(client, iov, 2, SS_TIMEOUT,
- ussd_send_resp_cb, data);
+ return g_isi_vsend(client, iov, 2, SS_TIMEOUT,
+ ussd_send_resp_cb, data, notify);
}
static void isi_request(struct ofono_ussd *ussd, const char *str,
if (written > SS_MAX_USSD_LENGTH)
goto error;
- if (ussd_send_make(ud->client, packed, num_packed, cbd))
+ if (ussd_send(ud->client, packed, num_packed, cbd, g_free))
return;
error:
if (!cbd)
goto error;
- if (g_isi_request_make(ud->client, msg, sizeof(msg), SS_TIMEOUT,
- ussd_send_resp_cb, cbd))
+ if (g_isi_send(ud->client, msg, sizeof(msg), SS_TIMEOUT,
+ ussd_send_resp_cb, cbd, g_free))
return;
error: