aboutsummaryrefslogtreecommitdiff
path: root/snowcast_server_concurrent.c
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2023-09-19 10:17:42 -0400
committersotech117 <michael_foiani@brown.edu>2023-09-19 10:17:42 -0400
commit80229ddf87ca847fa73420187b3db19c500957de (patch)
tree4cc8333a866eca394a147a66f68e81126bd6cb0e /snowcast_server_concurrent.c
parent8ab91f9c3e206b4a97f4e96998e58447a6110174 (diff)
start broadcasting right away
Diffstat (limited to 'snowcast_server_concurrent.c')
-rw-r--r--snowcast_server_concurrent.c7
1 files changed, 4 insertions, 3 deletions
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);
}
}