summaryrefslogtreecommitdiff
path: root/request.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-25 10:20:12 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-25 10:20:12 +0800
commit7f934ce683df5252fa6350dcc15e187b1c7623cf (patch)
treef600fc0cdfc9f4397580e44044468858167d0aa9 /request.c
parenta606c79d52d2027afaafd424a25fa6a4598aa8d7 (diff)
Rename remaining icclient to interchange
Diffstat (limited to 'request.c')
-rw-r--r--request.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/request.c b/request.c
index 3b1d715..2719d0a 100644
--- a/request.c
+++ b/request.c
@@ -26,11 +26,11 @@ extern char *cainfo;
struct container {
struct curl_httppost *post;
- void (*handler)(icclient_response *);
- icclient_response *response;
+ void (*handler)(interchange_response *);
+ interchange_response *response;
};
-static size_t append(char *data, size_t size, size_t nmemb, icclient_response *response)
+static size_t append(char *data, size_t size, size_t nmemb, interchange_response *response)
{
size_t realsize = size * nmemb;
response->data = realloc(response->data, response->numBytes + realsize + 1);
@@ -64,7 +64,7 @@ async(void *arg)
#ifdef DEBUG
const char *error = curl_easy_strerror(res);
#ifdef __ANDROID__
- __android_log_print(ANDROID_LOG_ERROR, "libicclient.so", "%s", error);
+ __android_log_print(ANDROID_LOG_ERROR, "libinterchange.so", "%s", error);
#else
fprintf(stderr, "%s\n", error);
#endif
@@ -79,7 +79,7 @@ async(void *arg)
}
#endif
-void request(void (*handler)(icclient_response *), void (*callback)(void *), struct body *body, char *fmt, ...)
+void request(void (*handler)(interchange_response *), void (*callback)(void *), struct body *body, char *fmt, ...)
{
va_list ap;
char *p, *sval;
@@ -177,7 +177,7 @@ void request(void (*handler)(icclient_response *), void (*callback)(void *), str
#endif
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, append);
- icclient_response *response = malloc(sizeof(icclient_response));
+ interchange_response *response = malloc(sizeof(interchange_response));
response->data = malloc(1);
response->numBytes = 0;
response->userData = callback;