diff options
author | Trumeet <yuuta@yuuta.moe> | 2021-10-11 13:42:49 -0700 |
---|---|---|
committer | Trumeet <yuuta@yuuta.moe> | 2021-10-11 13:42:49 -0700 |
commit | 251be34bea8d9c0a9f95f4cb2ade71b4c54b6d9b (patch) | |
tree | 6e6caf58acde1a8ad4ce81dac5009f3f7f2e440d /easy-tg.c | |
parent | 84fce72f4c04ca3a025fa97a54da643734cf251b (diff) | |
download | easy-tg-251be34bea8d9c0a9f95f4cb2ade71b4c54b6d9b.tar easy-tg-251be34bea8d9c0a9f95f4cb2ade71b4c54b6d9b.tar.gz easy-tg-251be34bea8d9c0a9f95f4cb2ade71b4c54b6d9b.tar.bz2 easy-tg-251be34bea8d9c0a9f95f4cb2ade71b4c54b6d9b.zip |
remove pthread support
Diffstat (limited to 'easy-tg.c')
-rw-r--r-- | easy-tg.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -18,11 +18,6 @@ const void *tg_reg4 = NULL; const void *tg_reg5 = NULL; const void *tg_reg6 = NULL; -#ifdef TG_ENABLE_PTHREAD -#include <pthread.h> -static pthread_mutex_t mutex_close = PTHREAD_MUTEX_INITIALIZER; -#endif - json_object *tg_mkreq(const char *extra, const char *type, const char *args_key, json_object *args) { json_object *root = json_object_new_object(); @@ -233,18 +228,12 @@ cleanup: int tg_destroy() { -#ifdef TG_ENABLE_PTHREAD - pthread_mutex_lock(&mutex_close); -#endif if(td == NULL) { return 0; } td_json_client_destroy(td); td = NULL; -#ifdef TG_ENABLE_PTHREAD - pthread_mutex_unlock(&mutex_close); -#endif return 0; } @@ -287,14 +276,8 @@ cleanup: int tg_close() { -#ifdef TG_ENABLE_PTHREAD - pthread_mutex_lock(&mutex_close); -#endif if(td == NULL) return 0; /* Using json object seems to be leaking */ tg_send_raw(false, "{ \"@type\": \"close\" }"); -#ifdef TG_ENABLE_PTHREAD - pthread_mutex_unlock(&mutex_close); -#endif return 0; } |