add log macros for plugins
[src/app-framework-binder.git] / src / main.c
index dbfbac5..defab84 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #define _GNU_SOURCE
+#define NO_PLUGIN_VERBOSE_MACRO
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -47,7 +48,7 @@
 #error "you should define PLUGIN_INSTALL_DIR"
 #endif
 
-#define AFB_VERSION    "0.4"
+#define AFB_VERSION    "0.5"
 
 // Define command line option
 #define SET_VERBOSE        1
@@ -479,10 +480,10 @@ static int init_http_server(struct afb_hsrv *hsrv, struct afb_config * config)
                return 0;
 
        for (idx = 0; idx < config->aliascount; idx++)
-               if (!afb_hsrv_add_alias (hsrv, config->aliasdir[idx].url, config->aliasdir[idx].path, 0))
+               if (!afb_hsrv_add_alias (hsrv, config->aliasdir[idx].url, config->aliasdir[idx].path, 0, 0))
                        return 0;
 
-       if (!afb_hsrv_add_alias(hsrv, "", config->rootdir, -10))
+       if (!afb_hsrv_add_alias(hsrv, "", config->rootdir, -10, 1))
                return 0;
 
        if (!afb_hsrv_add_handler(hsrv, config->rootbase, afb_hswitch_one_page_api_redirect, NULL, -20))
@@ -584,8 +585,12 @@ int main(int argc, char *argv[])  {
      exit (1);
   }
 
-  if (config->ldpaths) 
-    afb_api_so_add_pathset(config->ldpaths);
+  if (config->ldpaths) {
+    if (afb_api_so_add_pathset(config->ldpaths) < 0) {
+      ERROR("initialisation of plugins within %s failed", config->ldpaths);
+      exit(1);
+    }
+  }
 
   start_items(config->items);
   config->items = NULL;