Skip to content

Commit

Permalink
Fix defination
Browse files Browse the repository at this point in the history
  • Loading branch information
ajami1331 committed Jan 5, 2025
1 parent 0b5620b commit 808fc2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@
#include <sr_keychain.h>

#ifndef NDEBUG
// #define TARGET_URL "http://127.0.0.1:8888"
#define TARGET_URL "http://judge_ui:8888"
#else
#define TARGET_URL "https://judge.eluminatis-of-lu.com"
#endif

#define target_url(x) TARGET_URL "/" x

CURL *curl;
struct response
{
char *memory;
size_t size;
};
struct response response_body;
extern struct response response_body;
extern CURL *curl;

void init_curl(void);
void cleanup_curl(void);
Expand Down
3 changes: 3 additions & 0 deletions src/client.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#include <client.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct curl_slist *headers = NULL;
CURL *curl = NULL;
struct response response_body = {0};

static size_t
mem_cb(void *contents, size_t size, size_t nmemb, void *userp)
Expand Down

0 comments on commit 808fc2a

Please sign in to comment.