Commit graph

15 commits

Author SHA1 Message Date
=?UTF-8?q?Joakim=20S=C3=B6derberg?=
caf7e3d63b Fix potential memory leak
- Got rid of ifdef _WIN32 stuff adn moved to plat_ files instead.
- Also, check all calls to lws_zalloc, was potential failure on WIN32
- Made context destory enable to destroy a half inited context as well. This way I got get rid of some of the error handling complexity in libwebsocket_create_context
- Added TODOs for some potential problems I see where things might be leaking and such
2015-10-12 10:05:18 +08:00
Andy Green
d3efcd9461 windows check for NULL getprotobyname
From maxkaro on trac #110
https://libwebsockets.org/trac/libwebsockets/ticket/110

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-04-16 04:24:38 +08:00
Bud Davis
229bfec948 win32 use hashtable for fd management
At least some win32 uses an opaque pointer for fd that is not
an ordinal like it is in unix.

Resurrect the old hashtable management for that platform to use
instead, and introduce a helper to get the wsi from the fd "somehow".

Signed-off-by: Bud Davis <bdavis9659@gmail.com>
2015-01-30 10:48:57 +08:00
Alejandro Mery
6ff28248aa Subject: [PATCH] Use custom allocator
Signed-off-by: Alejandro Mery <amery@geeks.cl>
2014-12-05 07:26:26 +08:00
Emerson Clarke
32ec9d0299 plat win add ibterface to sa 2014-11-06 23:06:01 +08:00
Patrick Gansterer
c11b847fa8 Windows: Fix implementation of lws_plat_inet_ntop()
We need to pass a sockaddr_in6 struct to WSAAddressToString() to have a
working implementation for IPV6. Also use the WideChar version to allow
compilation on Windows CE too.
2014-04-15 18:45:48 +02:00
Patrick Gansterer
fe0ca596d6 Windows: Fix the passed parameter to the setsockopt function
This avoids compiler warnings about missmatched parameter types.
2014-04-15 18:41:38 +02:00
Andy Green
92795d64db windows fix breakage from plat refactor
Reported-by Marjan Tomas

Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 22:38:49 +08:00
Andy Green
a654fc0d50 clean move lws_plat externs
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 07:16:40 +08:00
Andy Green
1cd3ba6fdc ipv6 use lws_plat_ to avoid win naming collision
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 23:03:23 +08:00
Andy Green
5266f66f50 win32 inet_top
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 21:31:07 +08:00
Andy Green
e40aa9b920 plat change to build selection by cmake
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 21:04:03 +08:00
Andy Green
158e804cb7 refactor out WIN32 tests from code
This gets rid of all the platform-dependent #ifdef stuff and
migrates it into the new lws-plat-xxx.c files.

These are then included in a one-time test in libwebsockets.c
according basically to Windows or not.

The idea is from now on, all Windows-specific code should go in
lws-plat-win.c, where any kind of Windows perversion like DWORD
is fine.

Any new functions going in there should be named lws_plat_...
and be defined in all the lws-plat-xxx.c file (currently just
win32 and unix platforms are supported).

Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 14:25:10 +08:00
Andy Green
8c2c92491e win32 clean remove leftover ifdef
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-03-31 22:03:09 +08:00
Andy Green
bfaea95f60 clean libwebsockets.c
Signed-off-by: None <None>
2014-03-31 11:01:32 +08:00