[Libwebsockets] Where is the definition of openssl_SSL_CTX_private_data_index ?

Andy Green andy at warmcat.com
Mon Jan 9 18:58:21 CET 2017



On 10 January 2017 01:01:35 GMT+08:00, hanguofu <hanguofu at 163.com> wrote:
>I am reviewing the source code of libwebsockets and failed to find out
>where is openssl_SSL_CTX_private_data_index defined .
>
>
>Should it appear in private-libwebsockets.h ?
>
>
>Also openssl_websocket_private_data_index seems defined twice . One is
>in ssl.c , the other is in private-libwebsockets.h.
>
>
>Same problem with log_level.
>
>
>Besides , at my windows' version , the LWS_EXTERN  is blank : #define
>LWS_EXTERN

Yeah... I have forgotten why this is so.  Maybe some ordering conflict with LWS_VISIBLE.

Lws is written and tested on Linux... Windows support has come entirely from contributions.

The first few years there were a lot of contributions but lately there are only few.

It's build-tested for windows in Appveyor and I keep it from breaking, but that's it.

Anyway that is why it seems 'defined twice' on your platform, there is no 'extern' where there should be.

>, which seems a un-usual way to declear a global var.  For example , 
>openssl_websocket_private_data_index  had been decleared twice as
>external in ssl-server.c and ssl-client.c . Why does  this project not
>define global var. in a normal way ?

There's nothing wrong with declaring vars external in different files... in those places they are literally using the keyword 'extern'.  Can you help me understand what you feel is wrong with that?

As for empty LWS_EXTERN, a normal OS would want it declared as extern.  What happens on windows if you declare it like that?

-Andy

>
>Regards !
>
>
>Guofu Han

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



More information about the Libwebsockets mailing list