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
afb-hsrv: Prepare selection of listening interfaces
[src/app-framework-binder.git]
/
src
/
main-afb-daemon.c
diff --git
a/src/main-afb-daemon.c
b/src/main-afb-daemon.c
index
4fb4792
..
bb2f0a5
100644
(file)
--- a/
src/main-afb-daemon.c
+++ b/
src/main-afb-daemon.c
@@
-67,6
+67,10
@@
#include "jobs.h"
#include "sig-monitor.h"
#include "jobs.h"
#include "sig-monitor.h"
+#if !defined(DEFAULT_BINDER_INTERFACE)
+# define DEFAULT_BINDER_INTERFACE NULL
+#endif
+
/*
if SELF_PGROUP == 0 the launched command is the group leader
if SELF_PGROUP != 0 afb-daemon is the group leader
/*
if SELF_PGROUP == 0 the launched command is the group leader
if SELF_PGROUP != 0 afb-daemon is the group leader
@@
-371,13
+375,20
@@
static struct afb_hsrv *start_http_server()
NOTICE("Waiting port=%d rootdir=%s", http_port, rootdir);
NOTICE("Browser URL= http://localhost:%d", http_port);
NOTICE("Waiting port=%d rootdir=%s", http_port, rootdir);
NOTICE("Browser URL= http://localhost:%d", http_port);
- rc = afb_hsrv_start(hsrv,
(uint16_t) http_port,
15);
+ rc = afb_hsrv_start(hsrv, 15);
if (!rc) {
ERROR("starting of httpd failed");
afb_hsrv_put(hsrv);
return NULL;
}
if (!rc) {
ERROR("starting of httpd failed");
afb_hsrv_put(hsrv);
return NULL;
}
+ rc = afb_hsrv_add_interface_tcp(hsrv, DEFAULT_BINDER_INTERFACE, (uint16_t) http_port);
+ if (!rc) {
+ ERROR("setting interface failed");
+ afb_hsrv_put(hsrv);
+ return NULL;
+ }
+
return hsrv;
}
return hsrv;
}