aboutsummaryrefslogtreecommitdiff
path: root/aepd/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'aepd/main.c')
-rw-r--r--aepd/main.c12
1 files changed, 6 insertions, 6 deletions
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;
}