diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-07-15 20:32:19 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-07-15 20:32:19 +0200 |
commit | da4e79329f33efbde04d7791297c4a60b694640e (patch) | |
tree | e108a9436baa735ff435fc51274ffe1ff2479431 /handler.c | |
parent | bc59bdde077ac793acaa967f7d468421f0ac5922 (diff) |
fixed handler code, and moved streamer_set_nextsong and streamer_play_current_tracks code into the streamer thread
Diffstat (limited to 'handler.c')
-rw-r--r-- | handler.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -42,12 +42,12 @@ typedef struct message_s { typedef struct handler_s { int queue_size; - message_t pool[1]; message_t *mfree; message_t *mqueue; message_t *mqtail; uintptr_t mutex; uintptr_t cond; + message_t pool[1]; } handler_t; static void @@ -67,8 +67,10 @@ handler_alloc (int queue_size) { int sz = sizeof (handler_t) + (queue_size-1) * sizeof (message_t); handler_t *h = malloc (sz); memset (h, 0, sz); + h->queue_size = queue_size; h->mutex = mutex_create (); h->cond = cond_create (); + handler_reset (h); return h; } |