From 47fc4790a229f9ba0c3078106e7c3be212e2de7e Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 18 Dec 2015 12:38:04 +0800 Subject: align to libwebsockets api v1.6.0 Signed-off-by: Andy Green --- aepd/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'aepd/main.c') diff --git a/aepd/main.c b/aepd/main.c index 91fecd4..d293eed 100644 --- a/aepd/main.c +++ b/aepd/main.c @@ -30,7 +30,7 @@ unsigned long max_fifo_extent_seconds = 120; struct aepd_shared *aepd_shared; struct aepd_interface *aepd_interface; static double sam[MAX_PROBES * CHANNELS_PER_PROBE * DOUBLES_PER_CH_SAMPLE]; -extern struct libwebsocket_protocols protocols[]; +extern struct lws_protocols protocols[]; void zero_fifo(void) { @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) LOCAL_RESOURCE_PATH"/aepd.key.pem"; int port = 15164; int use_ssl = 0; - struct libwebsocket_context *context; + struct lws_context *context; int opts = LWS_SERVER_OPTION_SKIP_SERVER_CANONICAL_NAME; char interface_name[128] = ""; const char *interface_ptr = NULL; @@ -218,7 +218,7 @@ int main(int argc, char *argv[]) info.gid = -1; info.options = opts; - context = libwebsocket_create_context(&info); + context = lws_create_context(&info); if (context == NULL) { fprintf(stderr, "libwebsocket init failed\n"); return -1; @@ -250,7 +250,7 @@ int main(int argc, char *argv[]) /* websockets service process */ while (1) { - if (libwebsocket_service(context, 100)) + if (lws_service(context, 100)) break; if (getppid() == 1) break; @@ -261,11 +261,11 @@ int main(int argc, char *argv[]) if (ms10 > last) { last = ms10; - libwebsocket_callback_on_writable_all_protocol(&protocols[1]); + lws_callback_on_writable_all_protocol(context, &protocols[1]); } } - libwebsocket_context_destroy(context); + lws_context_destroy(context); return 0; } -- cgit v1.2.3