Fixed spelling
[src/app-framework-binder.git] / src / afs-main.c
index 980a1bc..88e4757 100644 (file)
@@ -30,6 +30,7 @@
 #include "afb-hswitch.h"
 #include "afb-hreq.h"
 #include "afb-apiset.h"
+#include "afb-api-ws.h"
 #include "afb-session.h"
 
 #include "afs-supervisor.h"
@@ -149,6 +150,15 @@ static void start(int signum, void *arg)
                goto error;
        }
 
+       /* export the service if required */
+       if (main_config->ws_server) {
+               rc = afb_api_ws_add_server(main_config->ws_server, main_apiset);
+               if (rc < 0) {
+                       ERROR("Can't export (ws-server) api %s: %m", main_config->ws_server);
+                       goto error;
+               }
+       }
+
        /* start the services */
        if (afb_apiset_start_all_services(main_apiset, 1) < 0)
                goto error;
@@ -177,7 +187,7 @@ error:
 }
 
 /**
- * initalize the supervision
+ * initialize the supervision
  */
 int main(int ac, char **av)
 {