summaryrefslogtreecommitdiff
path: root/src/tools/cbr/cbr_server.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-10 19:16:41 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-10 19:16:41 +0200
commit16cf56fc3c31a2f6201c4d9cc6e6ad314f9a1f37 (patch)
tree8a1654ef31bb091c285887a3b6c5d4ad1287382c /src/tools/cbr/cbr_server.c
parent88e820cd80323cf7f08fb7be1e683200016e9d34 (diff)
parent11c6be30491ebe4e41380f48a271c57bcff4b043 (diff)
downloadouroboros-16cf56fc3c31a2f6201c4d9cc6e6ad314f9a1f37.tar.gz
ouroboros-16cf56fc3c31a2f6201c4d9cc6e6ad314f9a1f37.zip
Merged in dstaesse/ouroboros/be-api-bind (pull request #203)
lib, irmd: Bind AP instances to AP_subsets
Diffstat (limited to 'src/tools/cbr/cbr_server.c')
-rw-r--r--src/tools/cbr/cbr_server.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tools/cbr/cbr_server.c b/src/tools/cbr/cbr_server.c
index fc23363f..d0666551 100644
--- a/src/tools/cbr/cbr_server.c
+++ b/src/tools/cbr/cbr_server.c
@@ -206,7 +206,7 @@ int server_main()
sigaction(SIGHUP, &sig_act, NULL) ||
sigaction(SIGPIPE, &sig_act, NULL)) {
printf("Failed to install sighandler.\n");
- exit(EXIT_FAILURE);
+ return -1;
}
if (pthread_mutex_init(&fds_lock, NULL)) {
@@ -216,7 +216,12 @@ int server_main()
if (pthread_cond_init(&fds_signal, NULL)) {
printf("Failed to init cond.\n");
- exit(EXIT_FAILURE);
+ return -1;
+ }
+
+ if (api_bind(NULL) < 0) {
+ printf("Failed to bind the server api.");
+ return -1;
}
for (i = 0; i < THREADS_SIZE; i++)