int tuxtxt_stop() { if (!tuxtxt_cache.receiving) return 1; tuxtxt_cache.receiving = 0; return tuxtxt_stop_thread(); }
int tuxtxt_stop() { if (!tuxtxt_cache.receiving) return 1; tuxtxt_cache.receiving = 0; pthread_mutex_lock(&tuxtxt_control_lock); int res = tuxtxt_stop_thread(); pthread_mutex_unlock(&tuxtxt_control_lock); return res; }