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
Add gitreview file for Kooky Koi branch
[src/app-framework-binder.git]
/
src
/
afb-hsrv.c
diff --git
a/src/afb-hsrv.c
b/src/afb-hsrv.c
index
0d0bd06
..
61e5c3c
100644
(file)
--- a/
src/afb-hsrv.c
+++ b/
src/afb-hsrv.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 201
6, 2017, 2018
"IoT.bzh"
+ * Copyright (C) 201
5-2020
"IoT.bzh"
* Author: José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Author: José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@
-42,11
+42,11
@@
#include "afb-hsrv.h"
#include "afb-fdev.h"
#include "afb-socket.h"
#include "afb-hsrv.h"
#include "afb-fdev.h"
#include "afb-socket.h"
+
#include "fdev.h"
#include "verbose.h"
#include "locale-root.h"
#include "fdev.h"
#include "verbose.h"
#include "locale-root.h"
-
-#include "afb-systemd.h"
+#include "systemd.h"
#include "jobs.h"
#define JSON_CONTENT "application/json"
#include "jobs.h"
#define JSON_CONTENT "application/json"
@@
-56,7
+56,7
@@
struct hsrv_itf {
struct hsrv_itf *next;
struct afb_hsrv *hsrv;
struct fdev *fdev;
struct hsrv_itf *next;
struct afb_hsrv *hsrv;
struct fdev *fdev;
- char uri[
1
];
+ char uri[];
};
struct hsrv_handler {
};
struct hsrv_handler {
@@
-533,7
+533,7
@@
static int hsrv_itf_connect(struct hsrv_itf *itf)
char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
int rgni;
char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
int rgni;
- itf->fdev = afb_socket_open_fdev
(itf->uri, 1
);
+ itf->fdev = afb_socket_open_fdev
_scheme(itf->uri, 1, "tcp"
);
if (!itf->fdev) {
ERROR("can't create socket %s", itf->uri);
return 0;
if (!itf->fdev) {
ERROR("can't create socket %s", itf->uri);
return 0;
@@
-562,7
+562,7
@@
int afb_hsrv_add_interface(struct afb_hsrv *hsrv, const char *uri)
{
struct hsrv_itf *itf;
{
struct hsrv_itf *itf;
- itf = malloc(sizeof *itf + strlen(uri));
+ itf = malloc(sizeof *itf +
1 +
strlen(uri));
if (itf == NULL)
return -1;
if (itf == NULL)
return -1;