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-wsj1.c
diff --git
a/src/afb-wsj1.c
b/src/afb-wsj1.c
index
be961f5
..
3876c32
100644
(file)
--- a/
src/afb-wsj1.c
+++ b/
src/afb-wsj1.c
@@
-29,6
+29,7
@@
#include "afb-ws.h"
#include "afb-wsj1.h"
#include "afb-ws.h"
#include "afb-wsj1.h"
+#include "fdev.h"
#define CALL 2
#define RETOK 3
#define CALL 2
#define RETOK 3
@@
-81,12
+82,11
@@
struct afb_wsj1
pthread_mutex_t mutex;
};
pthread_mutex_t mutex;
};
-struct afb_wsj1 *afb_wsj1_create(struct
sd_event *eloop, int fd
, struct afb_wsj1_itf *itf, void *closure)
+struct afb_wsj1 *afb_wsj1_create(struct
fdev *fdev
, struct afb_wsj1_itf *itf, void *closure)
{
struct afb_wsj1 *result;
{
struct afb_wsj1 *result;
- assert(eloop);
- assert(fd >= 0);
+ assert(fdev);
assert(itf);
assert(itf->on_call);
assert(itf);
assert(itf->on_call);
@@
-103,7
+103,7
@@
struct afb_wsj1 *afb_wsj1_create(struct sd_event *eloop, int fd, struct afb_wsj1
if (result->tokener == NULL)
goto error2;
if (result->tokener == NULL)
goto error2;
- result->ws = afb_ws_create(
eloop, fd
, &wsj1_itf, result);
+ result->ws = afb_ws_create(
fdev
, &wsj1_itf, result);
if (result->ws == NULL)
goto error3;
if (result->ws == NULL)
goto error3;
@@
-114,7
+114,7
@@
error3:
error2:
free(result);
error:
error2:
free(result);
error:
-
close(fd
);
+
fdev_unref(fdev
);
return NULL;
}
return NULL;
}