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-stub-ws: cosmetic improvements
[src/app-framework-binder.git]
/
src
/
afb-hsrv.c
diff --git
a/src/afb-hsrv.c
b/src/afb-hsrv.c
index
51502a6
..
1db59cd
100644
(file)
--- a/
src/afb-hsrv.c
+++ b/
src/afb-hsrv.c
@@
-38,7
+38,7
@@
#include "verbose.h"
#include "locale-root.h"
#include "verbose.h"
#include "locale-root.h"
-#include "afb-
common
.h"
+#include "afb-
systemd
.h"
#include "jobs.h"
#define JSON_CONTENT "application/json"
#include "jobs.h"
#define JSON_CONTENT "application/json"
@@
-238,8
+238,8
@@
static void end_handler(void *cls, struct MHD_Connection *connection, void **rec
static void do_run(int signum, void *arg)
{
MHD_UNSIGNED_LONG_LONG to;
static void do_run(int signum, void *arg)
{
MHD_UNSIGNED_LONG_LONG to;
-
struct afb_hsrv *hsrv = arg;
struct afb_hsrv *hsrv = arg;
+
if (!signum) {
do { MHD_run(hsrv->httpd); } while(MHD_get_timeout(hsrv->httpd, &to) == MHD_YES && !to);
}
if (!signum) {
do { MHD_run(hsrv->httpd); } while(MHD_get_timeout(hsrv->httpd, &to) == MHD_YES && !to);
}
@@
-420,7
+420,7
@@
int afb_hsrv_start(struct afb_hsrv *hsrv, uint16_t port, unsigned int connection
return 0;
}
return 0;
}
- rc = sd_event_add_io(afb_
common
_get_event_loop(), &evsrc, info->listen_fd, EPOLLIN, io_event_callback, hsrv);
+ rc = sd_event_add_io(afb_
systemd
_get_event_loop(), &evsrc, info->listen_fd, EPOLLIN, io_event_callback, hsrv);
if (rc < 0) {
MHD_stop_daemon(httpd);
errno = -rc;
if (rc < 0) {
MHD_stop_daemon(httpd);
errno = -rc;