Open ycaibb opened 3 years ago
Also, the below codes could be improved to release the lock before program exit for better resource management
static CURL* get_connection(const char* path)
{
pthread_mutex_lock(&pool_mut);
CURL* curl = curl_pool_count ? curl_pool[--curl_pool_count] : curl_easy_init();
if (!curl)
{
debugf(DBG_LEVEL_NORM, KRED"curl alloc failed");
abort();
}
pthread_mutex_unlock(&pool_mut);
return curl;
}
Hi, developers, thank you for your checking. It seems the lock
wiimote->rpt_mutex
is not released correctly when!rpt_mode & CWIID_RPT_IR==1
andexec_write_seq(wiimote, seq_len, ir_enable_seq)==1
in the functionupdate_rpt_mode
?https://github.com/abstrakraft/cwiid/blob/fadf11e89b579bcc0336a0692ac15c93785f3f82/libcwiid/state.c#L144
Best,