diff options
Diffstat (limited to 'pikul.c')
-rw-r--r-- | pikul.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -4,7 +4,7 @@ CURL *curl; json_tokener *tokener; struct shipping shipping; -static char *waybill = NULL; +static char *tracking_number = NULL; extern inline void headers(const char *[], char *[]); extern inline void handle(enum type, const char *, size_t, const char *[], const char *[], const char *[], @@ -118,7 +118,7 @@ char *pikul_order(const char *order_number, const char *service, const char *sen const char *destination, const char *receiver_address, const char *receiver_postal, int nitems, char **items[], _Bool insurance, double subtotal) { - curl_easy_setopt(curl, CURLOPT_WRITEDATA, &waybill); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, &tracking_number); char *url; char *post = NULL; size_t (*handler)(const char *, size_t, size_t, char **); @@ -139,7 +139,7 @@ char *pikul_order(const char *order_number, const char *service, const char *sen if (post) free(post); free(url); - return waybill; + return tracking_number; } void pikul_cleanup() @@ -151,8 +151,8 @@ void pikul_cleanup() default: break; } - if (waybill) - free(waybill); + if (tracking_number) + free(tracking_number); free(shipping.base); json_tokener_free(tokener); curl_slist_free_all(shipping.headers); |