1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-30 08:33:26 +01:00

forgot a lock

This commit is contained in:
Jfreegman 2014-03-13 06:43:53 -04:00
parent aeb70262e0
commit 9d52b6ab5d
2 changed files with 5 additions and 2 deletions

View File

@ -360,8 +360,12 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
wprintw(self->window, "key.\n\n"); wprintw(self->window, "key.\n\n");
wattroff(self->window, COLOR_PAIR(CYAN)); wattroff(self->window, COLOR_PAIR(CYAN));
pthread_mutex_lock(&Winthread.lock);
int nf = tox_get_num_online_friends(m);
pthread_mutex_unlock(&Winthread.lock);
wattron(self->window, A_BOLD); wattron(self->window, A_BOLD);
wprintw(self->window, " Online: %d/%d \n\n", tox_get_num_online_friends(m), num_friends); wprintw(self->window, " Online: %d/%d \n\n", nf, num_friends);
wattroff(self->window, A_BOLD); wattroff(self->window, A_BOLD);
if ((y2 - FLIST_OFST) <= 0) /* don't allow division by zero */ if ((y2 - FLIST_OFST) <= 0) /* don't allow division by zero */

View File

@ -405,7 +405,6 @@ void draw_active_window(Tox *m)
a->onKey(a, m, ch); a->onKey(a, m, ch);
pthread_mutex_unlock(&Winthread.lock); pthread_mutex_unlock(&Winthread.lock);
} }
} }
int get_num_active_windows(void) int get_num_active_windows(void)