mbed3 align to recent changes
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
c718ff30d8
commit
1fa7685a28
5 changed files with 27 additions and 25 deletions
|
@ -786,7 +786,6 @@ lws_ensure_user_space(struct lws *wsi)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if LWS_POSIX
|
||||
LWS_VISIBLE void lwsl_emit_stderr(int level, const char *line)
|
||||
{
|
||||
unsigned long long now;
|
||||
|
@ -806,7 +805,6 @@ LWS_VISIBLE void lwsl_emit_stderr(int level, const char *line)
|
|||
|
||||
fprintf(stderr, "%s%s", buf, line);
|
||||
}
|
||||
#endif
|
||||
|
||||
LWS_VISIBLE void _lws_logv(int filter, const char *format, va_list vl)
|
||||
{
|
||||
|
|
|
@ -185,14 +185,15 @@ extern "C" {
|
|||
#else /* NOT WIN32 */
|
||||
#include <unistd.h>
|
||||
|
||||
#define LWS_INVALID_FILE -1
|
||||
#define LWS_O_RDONLY O_RDONLY
|
||||
|
||||
#ifndef MBED_OPERATORS
|
||||
#include <poll.h>
|
||||
#include <netdb.h>
|
||||
#define LWS_INVALID_FILE -1
|
||||
#else
|
||||
#define getdtablesize() (20)
|
||||
#define LWS_INVALID_FILE NULL
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
@ -1362,23 +1363,23 @@ lws_add_http_header_by_name(struct lws_context *context,
|
|||
unsigned char *end);
|
||||
LWS_VISIBLE LWS_EXTERN int
|
||||
lws_finalize_http_header(struct lws_context *context,
|
||||
struct lws *wsi,
|
||||
unsigned char **p,
|
||||
unsigned char *end);
|
||||
struct lws *wsi,
|
||||
unsigned char **p,
|
||||
unsigned char *end);
|
||||
LWS_VISIBLE LWS_EXTERN int
|
||||
lws_add_http_header_by_token(struct lws_context *context,
|
||||
struct lws *wsi,
|
||||
enum lws_token_indexes token,
|
||||
const unsigned char *value,
|
||||
int length,
|
||||
unsigned char **p,
|
||||
unsigned char *end);
|
||||
struct lws *wsi,
|
||||
enum lws_token_indexes token,
|
||||
const unsigned char *value,
|
||||
int length,
|
||||
unsigned char **p,
|
||||
unsigned char *end);
|
||||
LWS_VISIBLE LWS_EXTERN int
|
||||
lws_add_http_header_content_length(struct lws_context *context,
|
||||
struct lws *wsi,
|
||||
unsigned long content_length,
|
||||
unsigned char **p,
|
||||
unsigned char *end);
|
||||
struct lws *wsi,
|
||||
unsigned long content_length,
|
||||
unsigned char **p,
|
||||
unsigned char *end);
|
||||
LWS_VISIBLE LWS_EXTERN int
|
||||
lws_add_http_header_status(struct lws_context *context, struct lws *wsi,
|
||||
unsigned int code, unsigned char **p,
|
||||
|
|
|
@ -12,12 +12,13 @@ unsigned long long time_in_microseconds(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
LWS_VISIBLE int lws_get_random(struct lws_context *context,
|
||||
void *buf, int len)
|
||||
LWS_VISIBLE int lws_get_random(struct lws_context *context, void *buf, int len)
|
||||
{
|
||||
(void)context;
|
||||
int n = len;
|
||||
unsigned char *b = (unsigned char *)buf;
|
||||
|
||||
(void)context;
|
||||
|
||||
while (n--)
|
||||
b[n]= rand();
|
||||
return len;
|
||||
|
@ -166,7 +167,7 @@ _lws_plat_file_open(struct lws *wsi, const char *filename,
|
|||
(void)filename;
|
||||
(void)filelen;
|
||||
(void)flags;
|
||||
return -1;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -180,7 +181,7 @@ _lws_plat_file_close(struct lws *wsi, lws_filefd_type fd)
|
|||
unsigned long
|
||||
_lws_plat_file_seek_cur(struct lws *wsi, lws_filefd_type fd, long offset)
|
||||
{
|
||||
(void)wsi
|
||||
(void)wsi;
|
||||
(void)fd;
|
||||
(void)offset;
|
||||
|
||||
|
@ -189,7 +190,7 @@ _lws_plat_file_seek_cur(struct lws *wsi, lws_filefd_type fd, long offset)
|
|||
|
||||
static int
|
||||
_lws_plat_file_read(struct lws *wsi, lws_filefd_type fd, unsigned long *amount,
|
||||
unsigned char* buf, unsigned long* len)
|
||||
unsigned char *buf, unsigned long len)
|
||||
{
|
||||
(void)wsi;
|
||||
(void)amount;
|
||||
|
@ -202,7 +203,7 @@ _lws_plat_file_read(struct lws *wsi, lws_filefd_type fd, unsigned long *amount,
|
|||
|
||||
static int
|
||||
_lws_plat_file_write(struct lws *wsi, lws_filefd_type fd, unsigned long *amount,
|
||||
unsigned char* buf, unsigned long len)
|
||||
unsigned char *buf, unsigned long len)
|
||||
{
|
||||
(void)wsi;
|
||||
(void)amount;
|
||||
|
@ -217,6 +218,8 @@ LWS_VISIBLE int
|
|||
lws_plat_init(struct lws_context *context,
|
||||
struct lws_context_creation_info *info)
|
||||
{
|
||||
(void)info;
|
||||
|
||||
context->fops.open = _lws_plat_file_open;
|
||||
context->fops.close = _lws_plat_file_close;
|
||||
context->fops.seek_cur = _lws_plat_file_seek_cur;
|
||||
|
|
|
@ -216,7 +216,7 @@ void lws_conn_listener::onIncoming(TCPListener *tl, void *impl)
|
|||
}
|
||||
|
||||
extern "C" LWS_VISIBLE struct lws *
|
||||
wsi_from_fd(struct lws_context *context, lws_sockfd_type fd)
|
||||
wsi_from_fd(const struct lws_context *context, lws_sockfd_type fd)
|
||||
{
|
||||
lws_conn *conn = (lws_conn *)fd;
|
||||
(void)context;
|
||||
|
|
|
@ -950,7 +950,7 @@ lws_b64_selftest(void);
|
|||
|
||||
#if defined(_WIN32) || defined(MBED_OPERATORS)
|
||||
LWS_EXTERN struct lws *
|
||||
wsi_from_fd(struct lws_context *context, lws_sockfd_type fd);
|
||||
wsi_from_fd(const struct lws_context *context, lws_sockfd_type fd);
|
||||
|
||||
LWS_EXTERN int
|
||||
insert_wsi(struct lws_context *context, struct lws *wsi);
|
||||
|
|
Loading…
Add table
Reference in a new issue