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
fdev: Introduce fdev for file event handling
[src/app-framework-binder.git]
/
src
/
afb-supervision.c
diff --git
a/src/afb-supervision.c
b/src/afb-supervision.c
index
f41ca18
..
0f8a16b
100644
(file)
--- a/
src/afb-supervision.c
+++ b/
src/afb-supervision.c
@@
-43,6
+43,7
@@
#include "afs-supervision.h"
#include "afb-stub-ws.h"
#include "afb-debug.h"
#include "afs-supervision.h"
#include "afb-stub-ws.h"
#include "afb-debug.h"
+#include "afb-fdev.h"
#include "verbose.h"
#include "wrap-json.h"
#include "jobs.h"
#include "verbose.h"
#include "wrap-json.h"
#include "jobs.h"
@@
-138,6
+139,7
@@
static void try_connect_supervisor()
int fd;
ssize_t srd;
struct afs_supervision_initiator initiator;
int fd;
ssize_t srd;
struct afs_supervision_initiator initiator;
+ struct fdev *fdev;
/* get the mutex */
pthread_mutex_lock(&mutex);
/* get the mutex */
pthread_mutex_lock(&mutex);
@@
-195,10
+197,15
@@
static void try_connect_supervisor()
}
/* make the supervisor link */
}
/* make the supervisor link */
- supervisor = afb_stub_ws_create_server(fd, supervision_apiname, supervision_apiset);
+ fdev = afb_fdev_create(fd);
+ if (!fdev) {
+ ERROR("Creation of fdev failed: %m");
+ goto end2;
+ }
+ supervisor = afb_stub_ws_create_server(fdev, supervision_apiname, supervision_apiset);
if (!supervisor) {
ERROR("Creation of supervisor failed: %m");
if (!supervisor) {
ERROR("Creation of supervisor failed: %m");
- goto end
2
;
+ goto end;
}
afb_stub_ws_on_hangup(supervisor, on_supervisor_hangup);
}
afb_stub_ws_on_hangup(supervisor, on_supervisor_hangup);