aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2024-06-07 22:09:06 -0400
committerTest_User <hax@andrewyu.org>2024-06-07 22:09:06 -0400
commit5c9c4339ac97ffb9c66d9f3dd3a8285badd24d71 (patch)
tree59ff5a5bf712e8fc02717cdb4e1d597497cc38e5 /main.c
parent92d08e2442d0230ac096b6484d32f6ec75a8a622 (diff)
downloadcoupserv-5c9c4339ac97ffb9c66d9f3dd3a8285badd24d71.tar.gz
coupserv-5c9c4339ac97ffb9c66d9f3dd3a8285badd24d71.zip
(Optional) Client certificate support, fix main to exit if init client or server network fails
Diffstat (limited to '')
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index f720b3c..323ea8e 100644
--- a/main.c
+++ b/main.c
@@ -241,8 +241,10 @@ void *client_loop(void *ign) {
pthread_t client_thread_id;
int main(void) {
- initservernetwork();
- initclientnetwork();
+ if (initservernetwork() != 0)
+ return 1;
+ if (initclientnetwork() != 0)
+ return 1;
pthread_create(&client_thread_id, NULL, client_loop, NULL);