Skip to content
Snippets Groups Projects
func_test.c 488 B
Newer Older
  • Learn to ignore specific revisions
  • #include <stdio.h>
    #include "libmobile_hilink.h"
    #include "libmobile_zte.h"
    
    typedef struct json_object *(*func_ptr)(char *, char *);
    func_ptr active_mobile_set_pin;
    
    struct json_object *mobile_set_pin(char *dongle, char *current_pin, char *new_pin)
    {
    	if (mobile_set_pin_impl)
    		mobile_set_pin_impl(current_pin, new_pin);
    
    	if (strcmp(dongle, "zte") == 0)
    		mobile_set_pin_impl = mobile_set_pin_zte;
    
    	if (strcmp(dongle, "hilink") == 0)
    		mobile_set_pin_impl = mobile_set_pin_hilink;
    
    }