Skip to content
Snippets Groups Projects
Commit fa741c12 authored by Jakob Olsson's avatar Jakob Olsson
Browse files

add some missing declarations from libmobile_wrapper, correction to calls

parent 744299c9
Branches
No related tags found
No related merge requests found
...@@ -79,7 +79,7 @@ int set_pin(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -79,7 +79,7 @@ int set_pin(struct ubus_context *ctx, struct ubus_object *obj,
goto fail_input; goto fail_input;
} }
if (!pin_status(&bb, global_dev->ip)) { if (!pin_status(&bb, global_dev)) {
ubus_send_reply(ctx, req, bb.head); ubus_send_reply(ctx, req, bb.head);
goto disabled; goto disabled;
} }
...@@ -189,7 +189,7 @@ int enable_pin(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -189,7 +189,7 @@ int enable_pin(struct ubus_context *ctx, struct ubus_object *obj,
goto fail_input; goto fail_input;
} }
if (pin_status(&bb, global_dev->ip)) { if (pin_status(&bb, global_dev)) {
debug_print("pin already enabled"); debug_print("pin already enabled");
ubus_send_reply(ctx, req, bb.head); ubus_send_reply(ctx, req, bb.head);
goto enabled; goto enabled;
...@@ -244,7 +244,7 @@ int verify_pin(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -244,7 +244,7 @@ int verify_pin(struct ubus_context *ctx, struct ubus_object *obj,
goto fail_input; goto fail_input;
} }
if (!pin_status(&bb, global_dev->ip)) { if (!pin_status(&bb, global_dev)) {
debug_print("pin disabled"); debug_print("pin disabled");
ubus_send_reply(ctx, req, bb.head); ubus_send_reply(ctx, req, bb.head);
goto disabled; goto disabled;
...@@ -471,7 +471,7 @@ int connect_network(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -471,7 +471,7 @@ int connect_network(struct ubus_context *ctx, struct ubus_object *obj,
{ {
struct json_object *response; struct json_object *response;
response = mobile_connect_network_zte(global_dev->ip); response = mobile_connect_network(global_dev);
if (!response) if (!response)
goto fail_unknown; goto fail_unknown;
...@@ -487,7 +487,7 @@ int disconnect_network(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -487,7 +487,7 @@ int disconnect_network(struct ubus_context *ctx, struct ubus_object *obj,
{ {
struct json_object *response; struct json_object *response;
response = mobile_disconnect_network_zte(global_dev->ip); response = mobile_disconnect_network(global_dev);
if (!response) if (!response)
goto fail_unknown; goto fail_unknown;
...@@ -503,7 +503,7 @@ int modem_state(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -503,7 +503,7 @@ int modem_state(struct ubus_context *ctx, struct ubus_object *obj,
{ {
struct json_object *response; struct json_object *response;
response = mobile_get_modem_state_zte(global_dev->ip); response = mobile_get_modem_state(global_dev);
if (!response) if (!response)
goto fail_unknown; goto fail_unknown;
...@@ -519,7 +519,7 @@ int enable_roaming(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -519,7 +519,7 @@ int enable_roaming(struct ubus_context *ctx, struct ubus_object *obj,
{ {
struct json_object *response; struct json_object *response;
response = mobile_enable_roaming_zte(global_dev->ip); response = mobile_enable_roaming(global_dev);
if (!response) if (!response)
goto fail_unknown; goto fail_unknown;
...@@ -535,7 +535,7 @@ int disable_roaming(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -535,7 +535,7 @@ int disable_roaming(struct ubus_context *ctx, struct ubus_object *obj,
{ {
struct json_object *response; struct json_object *response;
response = mobile_disable_roaming_zte(global_dev->ip); response = mobile_disable_roaming(global_dev);
if (!response) if (!response)
goto fail_unknown; goto fail_unknown;
...@@ -551,7 +551,7 @@ int roam_status(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -551,7 +551,7 @@ int roam_status(struct ubus_context *ctx, struct ubus_object *obj,
{ {
struct json_object *response; struct json_object *response;
response = mobile_get_roam_status_zte(global_dev->ip); response = mobile_get_roam_status(global_dev);
if (!response) if (!response)
goto fail_unknown; goto fail_unknown;
......
...@@ -34,5 +34,11 @@ struct json_object *mobile_set_apn_profile(struct device *dev, char *name); ...@@ -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_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_current_apn(struct device *dev);
struct json_object *mobile_get_rssi(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); struct json_object *mobile_get_pin_status(struct device *dev);
#endif #endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment