[Libwebsockets] inconsistency ? user vs in parameters

Edwin van den Oetelaar oetelaar.automatisering at gmail.com
Wed Feb 20 13:45:48 CET 2013


for consistency :
the 'user' is now changed to 'in'


index 8ab4cb1..ce2f61e 100644
--- a/test-server/test-server.c
+++ b/test-server/test-server.c
@@ -246,7 +246,7 @@ bail:

        case LWS_CALLBACK_FILTER_NETWORK_CONNECTION:
 #if 0
-               libwebsockets_get_peer_addresses(context, wsi,
(int)(long)user, client_name,
+               libwebsockets_get_peer_addresses(context, wsi,
(int)(long)in, client_name,
                             sizeof(client_name), client_ip, sizeof(client_ip));

                fprintf(stderr, "Received network connect from %s (%s)\n",



To make that work, I had to change the library too....

diff --git a/lib/server.c b/lib/server.c
index 44e6222..ae580c8 100644
--- a/lib/server.c
+++ b/lib/server.c
@@ -246,7 +246,7 @@ int lws_server_socket_service(struct
libwebsocket_context *context,

                if ((context->protocols[0].callback)(context, wsi,
                                LWS_CALLBACK_FILTER_NETWORK_CONNECTION,
-                                          (void *)(long)accept_fd, NULL, 0)) {
+                                          NULL, (void *)(long)accept_fd, 0)) {
                        lwsl_debug("Callback denied network connection\n");
                        compatible_close(accept_fd);
                        break;



More information about the Libwebsockets mailing list