diff options
Diffstat (limited to 'pikul.c')
-rw-r--r-- | pikul.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -23,6 +23,9 @@ void anteraja_order(const char *, const char *, const char *, const char *, cons char **[], double); void anteraja_cleanup(); +const char **sicepat_init(char *[]); +const char **sicepat_services(const char *, const char *, double); + static void recurse(struct json_object *outer, const char *trail[], struct json_object **last) { struct json_object *inner = NULL; @@ -128,6 +131,9 @@ void pikul_init(enum pikul_company company, char *provisions[]) case PIKUL_ANTERAJA: fields = anteraja_init(provisions); break; + case PIKUL_SICEPAT: + fields = sicepat_init(provisions); + break; default: break; } @@ -150,6 +156,9 @@ struct pikul_service **pikul_services(enum pikul_company company, case PIKUL_ANTERAJA: shipping->data = anteraja_services(origin, destination, weight); break; + case PIKUL_SICEPAT: + shipping->data = sicepat_services(origin, destination, weight); + break; default: break; } @@ -160,7 +169,8 @@ struct pikul_service **pikul_services(enum pikul_company company, #ifdef DEBUG fprintf(stderr, "POST: %s\n", shipping->post); #endif - } + } else + curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); shipping->mode = SERVICES; curl_easy_perform(curl); if (shipping->post) @@ -308,7 +318,8 @@ char *pikul_order(enum pikul_company company, const char *order_number, const ch #ifdef DEBUG fprintf(stderr, "POST: %s\n", shipping->post); #endif - } + } else + curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); shipping->mode = ORDER; curl_easy_perform(curl); if (shipping->post) |