Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix don't close session on 'create again' error
[src/app-framework-binder.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
dbfbac5
..
d1a0745
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-47,7
+47,7
@@
#error "you should define PLUGIN_INSTALL_DIR"
#endif
#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
// Define command line option
#define SET_VERBOSE 1
@@
-479,10
+479,10
@@
static int init_http_server(struct afb_hsrv *hsrv, struct afb_config * config)
return 0;
for (idx = 0; idx < config->aliascount; idx++)
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;
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))
return 0;
if (!afb_hsrv_add_handler(hsrv, config->rootbase, afb_hswitch_one_page_api_redirect, NULL, -20))
@@
-584,8
+584,12
@@
int main(int argc, char *argv[]) {
exit (1);
}
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;
start_items(config->items);
config->items = NULL;