From 80229ddf87ca847fa73420187b3db19c500957de Mon Sep 17 00:00:00 2001 From: sotech117 Date: Tue, 19 Sep 2023 10:17:42 -0400 Subject: start broadcasting right away --- snowcast_control | Bin 35309 -> 21328 bytes snowcast_listener | Bin 34654 -> 19128 bytes snowcast_server | Bin 55212 -> 37208 bytes snowcast_server_concurrent.c | 7 ++++--- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/snowcast_control b/snowcast_control index cd01917..0d1ee4f 100755 Binary files a/snowcast_control and b/snowcast_control differ diff --git a/snowcast_listener b/snowcast_listener index 1ed31fc..9f75571 100755 Binary files a/snowcast_listener and b/snowcast_listener differ diff --git a/snowcast_server b/snowcast_server index cf52441..d9c7013 100755 Binary files a/snowcast_server and b/snowcast_server differ diff --git a/snowcast_server_concurrent.c b/snowcast_server_concurrent.c index 47b112a..d0e6aa5 100644 --- a/snowcast_server_concurrent.c +++ b/snowcast_server_concurrent.c @@ -112,6 +112,10 @@ int main(int argc, char *argv[]) pthread_t s_thread; pthread_create(&s_thread, NULL, select_thread, NULL); + // start syncchronization thread to broadcast stations + pthread_t sync_thread; +pthread_create(&sync_thread, NULL, synchronization_thread, NULL); + // command line interface char input[LINE_MAX]; while (1) { @@ -129,9 +133,6 @@ int main(int argc, char *argv[]) print_user_data(i); } } else if (strncmp("s\n", input, LINE_MAX) == 0) { - // start the streaming threads - pthread_t sync_thread; - pthread_create(&sync_thread, NULL, synchronization_thread, NULL); } } -- cgit v1.2.3-70-g09d2