X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-binder.git;a=blobdiff_plain;f=src%2Fmain-afb-daemon.c;h=bb2f0a5638e80f1542fb2f294df8e42f42caadc4;hp=4fb4792c7248ceff83eaa3bda3fe1772e733905c;hb=c31411aaba6c8bd04f68bfdb1f042d018e677790;hpb=2703a6bd8611726fa61118bf9c68a6e2ea0b9b22 diff --git a/src/main-afb-daemon.c b/src/main-afb-daemon.c index 4fb4792c..bb2f0a56 100644 --- a/src/main-afb-daemon.c +++ b/src/main-afb-daemon.c @@ -67,6 +67,10 @@ #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 @@ -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); - 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; } + 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; }