diff --git a/libmobile_zte.c b/libmobile_zte.c index 58bc5d2c85901a8cde4562e455d62691db6a2f41..42719e741ff15ccf96990a8285a95c013f5853ec 100644 --- a/libmobile_zte.c +++ b/libmobile_zte.c @@ -539,6 +539,11 @@ struct json_object *mobile_enable_pin_zte(char *ip_addr, char *pin) return prepare_request(ip_addr, query, POST); } +struct json_object *mobile_verify_pin_zte(char *ip_addr, char *pin) +{ + return mobile_set_pin_zte(ip_addr, pin, pin); +} + struct json_object *mobile_set_pin_zte(char *ip_addr, char *current_pin, char *new_pin) { char query[1024] = {0}; diff --git a/libmobile_zte.h b/libmobile_zte.h index 5bfcf27fd1c1ffabe01465e3398644e4560886d6..da88ced3275f40417226717954d7afbf0166478c 100644 --- a/libmobile_zte.h +++ b/libmobile_zte.h @@ -235,6 +235,21 @@ struct json_object *mobile_set_apn_profile_zte(char *ip_addr, char *name); */ struct json_object *mobile_enable_pin_zte(char *ip_addr, char *pin); +/** + * Function: mobile_verify_pin + * + * Verifies whether input pin is the active one. + * + * Parameter: + * ip_addr - host addr of mobile dongle + * pin - pin to verify + * + * Returns: + * A pointer to a json_object containing the JSON response from the server. {"result": "success"/"failure"} + * NULL on failure. + */ +struct json_object *mobile_verify_pin_zte(char *ip_addr, char *pin); + /** * Function: mobile_set_pin *