TAILQ_HEAD(htsp_msg_q_queue, htsp_msg_q);
static struct htsp_connection_list htsp_async_connections;
+static struct htsp_connection_list htsp_connections;
static void htsp_streaming_input(void *opaque, streaming_message_t *sm);
*
*/
typedef struct htsp_connection {
+ LIST_ENTRY(htsp_connection) htsp_link;
+
int htsp_fd;
struct sockaddr_in *htsp_peer;
htsp.htsp_peer = source;
htsp.htsp_writer_run = 1;
+ pthread_mutex_lock(&global_lock);
+ LIST_INSERT_HEAD(&htsp_connections, &htsp, htsp_link);
+ pthread_mutex_unlock(&global_lock);
+
pthread_create(&htsp.htsp_writer_thread, NULL, htsp_write_scheduler, &htsp);
/**
if(htsp.htsp_async_mode)
LIST_REMOVE(&htsp, htsp_async_link);
+ LIST_REMOVE(&htsp, htsp_link);
+
pthread_mutex_unlock(&global_lock);
pthread_mutex_lock(&htsp.htsp_out_mutex);