From fa741c12869ac302aa70229cc35583e510115af3 Mon Sep 17 00:00:00 2001 From: Jakob Olsson <jakobols@kth.se> Date: Mon, 11 Jun 2018 11:32:16 +0200 Subject: [PATCH] add some missing declarations from libmobile_wrapper, correction to calls --- dongle_infrastructure.c | 18 +++++++++--------- libmobile_wrapper.h | 6 ++++++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/dongle_infrastructure.c b/dongle_infrastructure.c index 33f40a2..cfffd0b 100644 --- a/dongle_infrastructure.c +++ b/dongle_infrastructure.c @@ -79,7 +79,7 @@ int set_pin(struct ubus_context *ctx, struct ubus_object *obj, goto fail_input; } - if (!pin_status(&bb, global_dev->ip)) { + if (!pin_status(&bb, global_dev)) { ubus_send_reply(ctx, req, bb.head); goto disabled; } @@ -189,7 +189,7 @@ int enable_pin(struct ubus_context *ctx, struct ubus_object *obj, goto fail_input; } - if (pin_status(&bb, global_dev->ip)) { + if (pin_status(&bb, global_dev)) { debug_print("pin already enabled"); ubus_send_reply(ctx, req, bb.head); goto enabled; @@ -244,7 +244,7 @@ int verify_pin(struct ubus_context *ctx, struct ubus_object *obj, goto fail_input; } - if (!pin_status(&bb, global_dev->ip)) { + if (!pin_status(&bb, global_dev)) { debug_print("pin disabled"); ubus_send_reply(ctx, req, bb.head); goto disabled; @@ -471,7 +471,7 @@ int connect_network(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_connect_network_zte(global_dev->ip); + response = mobile_connect_network(global_dev); if (!response) goto fail_unknown; @@ -487,7 +487,7 @@ int disconnect_network(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_disconnect_network_zte(global_dev->ip); + response = mobile_disconnect_network(global_dev); if (!response) goto fail_unknown; @@ -503,7 +503,7 @@ int modem_state(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_get_modem_state_zte(global_dev->ip); + response = mobile_get_modem_state(global_dev); if (!response) goto fail_unknown; @@ -519,7 +519,7 @@ int enable_roaming(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_enable_roaming_zte(global_dev->ip); + response = mobile_enable_roaming(global_dev); if (!response) goto fail_unknown; @@ -535,7 +535,7 @@ int disable_roaming(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_disable_roaming_zte(global_dev->ip); + response = mobile_disable_roaming(global_dev); if (!response) goto fail_unknown; @@ -551,7 +551,7 @@ int roam_status(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_get_roam_status_zte(global_dev->ip); + response = mobile_get_roam_status(global_dev); if (!response) goto fail_unknown; diff --git a/libmobile_wrapper.h b/libmobile_wrapper.h index d2dac90..6b55576 100644 --- a/libmobile_wrapper.h +++ b/libmobile_wrapper.h @@ -34,5 +34,11 @@ struct json_object *mobile_set_apn_profile(struct device *dev, char *name); struct json_object *mobile_create_apn_profile(struct device *dev, char *profile_name, char *wan_apn, char *pdp_type); struct json_object *mobile_get_current_apn(struct device *dev); struct json_object *mobile_get_rssi(struct device *dev); +struct json_object *mobile_connect_network(struct device *dev); +struct json_object *mobile_disconnect_network(struct device *dev); +struct json_object *mobile_get_modem_state(struct device *dev); +struct json_object *mobile_enable_roaming(struct device *dev); +struct json_object *mobile_disable_roaming(struct device *dev); +struct json_object *mobile_get_roam_status(struct device *dev); struct json_object *mobile_get_pin_status(struct device *dev); #endif \ No newline at end of file -- GitLab