platform/upstream/libwebsockets.git
8 years agolibev complete unix plat context init
Andy Green [Wed, 23 Dec 2015 03:55:06 +0000 (11:55 +0800)]
libev complete unix plat context init

https://github.com/warmcat/libwebsockets/issues/381

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agolibev context destroy
gaby64 [Tue, 22 Dec 2015 04:41:12 +0000 (12:41 +0800)]
libev context destroy

https://github.com/warmcat/libwebsockets/issues/380

8 years agotest ping android compatibility
Andy Green [Tue, 22 Dec 2015 00:17:34 +0000 (08:17 +0800)]
test ping android compatibility

After "emptyVoid" at

https://github.com/warmcat/libwebsockets/issues/379

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoSubject: [PATCH] Typo in macro name.
Roger A. Light [Sat, 19 Dec 2015 01:26:53 +0000 (01:26 +0000)]
Subject: [PATCH] Typo in macro name.

8 years agouridecoding lws_hdr_fragment_length
Andy Green [Fri, 18 Dec 2015 23:35:23 +0000 (07:35 +0800)]
uridecoding lws_hdr_fragment_length

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agowhitespace tidy
Andy Green [Fri, 18 Dec 2015 23:18:55 +0000 (07:18 +0800)]
whitespace tidy

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agouridecode no need to require length plus 2
Andy Green [Fri, 18 Dec 2015 08:40:02 +0000 (16:40 +0800)]
uridecode no need to require length plus 2

length + 1 (for the '\0' is enough)

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agouridecoding disallow uriencoded equals in name part
Andy Green [Fri, 18 Dec 2015 07:40:03 +0000 (15:40 +0800)]
uridecoding disallow uriencoded equals in name part

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agouridecoding handle plus chars as space
Andy Green [Fri, 18 Dec 2015 07:23:31 +0000 (15:23 +0800)]
uridecoding handle plus chars as space

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agouridecoding support optional semicolon as delimiter
Andy Green [Fri, 18 Dec 2015 07:20:09 +0000 (15:20 +0800)]
uridecoding support optional semicolon as delimiter

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoversion 1.6.0
Andy Green [Fri, 18 Dec 2015 02:35:11 +0000 (10:35 +0800)]
version 1.6.0

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoapi doc v1.6.0
Andy Green [Fri, 18 Dec 2015 03:18:56 +0000 (11:18 +0800)]
api doc v1.6.0

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agochangelog pre v1.6.0
Andy Green [Fri, 18 Dec 2015 03:01:03 +0000 (11:01 +0800)]
changelog pre v1.6.0

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean uri arg dump
Andy Green [Fri, 18 Dec 2015 02:46:24 +0000 (10:46 +0800)]
clean uri arg dump

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agocontext protocol destroy provide nonnull wsi with context
Andy Green [Thu, 17 Dec 2015 17:08:14 +0000 (01:08 +0800)]
context protocol destroy provide nonnull wsi with context

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoserver check cb return during establish
Andy Green [Thu, 17 Dec 2015 16:56:31 +0000 (00:56 +0800)]
server check cb return during establish

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclient check cb return during establish
Andy Green [Thu, 17 Dec 2015 16:50:14 +0000 (00:50 +0800)]
client check cb return during establish

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agolws_get_context not _ctx
Andy Green [Thu, 17 Dec 2015 10:25:25 +0000 (18:25 +0800)]
lws_get_context not _ctx

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean internal refactor
Andy Green [Thu, 17 Dec 2015 09:03:59 +0000 (17:03 +0800)]
clean internal refactor

 - Mainly symbol length reduction
 - Whitespace clean
 - Code refactor for linear flow
 - Audit @Context for API docs vs changes

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agowin cover clearing sock_send_blocking when external poll
Andy Green [Thu, 17 Dec 2015 07:35:41 +0000 (15:35 +0800)]
win cover clearing sock_send_blocking when external poll

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agowin solve various cranky problems with msvc
Andy Green [Thu, 17 Dec 2015 07:15:12 +0000 (15:15 +0800)]
win solve various cranky problems with msvc

After emptyVoid at --->

https://github.com/warmcat/libwebsockets/issues/374

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean misc 1
Andy Green [Thu, 17 Dec 2015 00:09:13 +0000 (08:09 +0800)]
clean misc 1

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agopublic api remove context from user callback API BREAK
Andy Green [Wed, 16 Dec 2015 23:54:44 +0000 (07:54 +0800)]
public api remove context from user callback API BREAK

Since struct lws (wsi) now has his own context pointer,
we were able to remove the need for passing context
almost everywhere in the apis.

In turn, that means there's no real use for context being
passed to every callback; in the rare cases context is
needed user code can get it with lws_get_ctx(wsi)

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agowindows fix wsapoll conflict on some toolchains
Andy Green [Wed, 16 Dec 2015 11:51:12 +0000 (19:51 +0800)]
windows fix wsapoll conflict on some toolchains

After EmptyVoid at github

https://github.com/warmcat/libwebsockets/issues/374

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agopublic api remove superfluous context params API BREAK
Andy Green [Wed, 16 Dec 2015 10:19:08 +0000 (18:19 +0800)]
public api remove superfluous context params API BREAK

Extend the cleanout caused by wsi having a context pointer
into the public api.

There's no point keeping the 1.5 compatibility work,
we have changed the api in several places and
rebuilt wasn't going to be enough a while ago.

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoadd LWS_INLINE to deal with crappy msvc
Andy Green [Wed, 16 Dec 2015 07:02:47 +0000 (15:02 +0800)]
add LWS_INLINE to deal with crappy msvc

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agohttp uri arguments process in fragments
Andy Green [Tue, 15 Dec 2015 14:57:19 +0000 (22:57 +0800)]
http uri arguments process in fragments

This makes the URI argument processing split each parameter into
a "fragment".  Processing header content as fragments already exists
in lws, because it's legal to deliver header content by repeating
the header.

Now there's an api to access individual fragments, also add the
code to the test server to print each URI argument separately.

Adapt attack.sh to parse the fragments.

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoURIPS_ARGUMENTS is redundant
Andy Green [Tue, 15 Dec 2015 15:05:23 +0000 (23:05 +0800)]
URIPS_ARGUMENTS is redundant

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agodocument how the header fragments work
Andy Green [Tue, 15 Dec 2015 15:03:29 +0000 (23:03 +0800)]
document how the header fragments work

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agointroduce lws_hdr_copy_fragment
Andy Green [Tue, 15 Dec 2015 14:59:23 +0000 (22:59 +0800)]
introduce lws_hdr_copy_fragment

This adds a public API variant of the header copy api that lets you
choose which fragment you want copied.

Normally you want the existing one that aggregates the fragments.

But it can be useful to get each part in turn (that corresponds to
the content provided by each duplicated header normally).

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agorefactor needless context with wsi paramater passing
Andy Green [Tue, 15 Dec 2015 13:15:58 +0000 (21:15 +0800)]
refactor needless context with wsi paramater passing

Now we bit the bullet and gave each wsi an lws_context *, many
internal apis that take both a context and wsi parameter only
need the wsi.

Also simplify parser code by making a temp var for
allocated_headers * instead of the longwinded
dereference chain everywhere.

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoSubject: [PATCH] Add LWS_LIBRARY_VERSION_NUMBER to lws_config.h.
Roger A. Light [Mon, 14 Dec 2015 17:25:29 +0000 (17:25 +0000)]
Subject: [PATCH] Add LWS_LIBRARY_VERSION_NUMBER to lws_config.h.

This changeset adds a few preprocessor macros to lws_config.h to allow
a user of libwebsockets to determine at compile time which version of
lws they are compiling against.

This exposes the already existing LWS_LIBRARY_VERSION_MAJOR and _MINOR
values, and adds LWS_LIBRARY_VERSION_PATCH. This suggests that future
minor bugfix release versions of lws would be e.g. 1.6.0 -> 1.6.1 rather
than the style used previously: 1.2 -> 1.21.

The way this is currently set up means new minor revisions (with
_PATCH==0) always end with .0 but I could change this if preferred.

The most important addition is LWS_LIBRARY_VERSION_NUMBER, which
produces a number of the form 1005001 for version 1.5.1 - i.e. each part
major, minor, patch can extend from 0-999. This macro allows a very easy
compile time comparison of version numbers.

8 years agoFix corruption of close reason code in close frame
Andrejs Hanins [Tue, 15 Dec 2015 11:31:23 +0000 (13:31 +0200)]
Fix corruption of close reason code in close frame

According to specification, close reason code is part of body

8 years agombed3 use new upstream mbed3 nagle disable
Andy Green [Tue, 15 Dec 2015 11:46:28 +0000 (19:46 +0800)]
mbed3 use new upstream mbed3 nagle disable

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agouriencoding deal with0uriencoded question mark properly
Andy Green [Mon, 14 Dec 2015 11:42:26 +0000 (19:42 +0800)]
uriencoding deal with0uriencoded question mark properly

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agowin align to recent changes
Andy Green [Mon, 14 Dec 2015 03:34:00 +0000 (11:34 +0800)]
win align to recent changes

These were warnings seen on Appveyor

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agombed3 align to recent changes
Andy Green [Mon, 14 Dec 2015 03:17:16 +0000 (11:17 +0800)]
mbed3 align to recent changes

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoRefactoring conditional directives for if wrappers
wmarquesr [Sun, 13 Dec 2015 23:36:41 +0000 (20:36 -0300)]
Refactoring conditional directives for if wrappers

8 years agowhitespace trailing mass cleanout
Andy Green [Mon, 14 Dec 2015 00:52:03 +0000 (08:52 +0800)]
whitespace trailing mass cleanout

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agolibev take care about const context where possible
Andy Green [Sun, 13 Dec 2015 23:51:15 +0000 (07:51 +0800)]
libev take care about const context where possible

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agochangelog update file api about wsi
Andy Green [Sun, 13 Dec 2015 23:21:42 +0000 (07:21 +0800)]
changelog update file api about wsi

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agointroduce lws_wsi_user
Andy Green [Sun, 13 Dec 2015 23:16:32 +0000 (07:16 +0800)]
introduce lws_wsi_user

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agochangelog explain protocols related api changes
Andy Green [Sun, 13 Dec 2015 23:02:51 +0000 (07:02 +0800)]
changelog explain protocols related api changes

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agolws_plat_fd add wsi to fops and helpers
Andy Green [Fri, 11 Dec 2015 05:12:58 +0000 (13:12 +0800)]
lws_plat_fd add wsi to fops and helpers

Having the lws_context alone doesn't let us track state or act different
by wsi, which is the most interesting usecase.  Eg not only simply track
file position / decompression state per wsi but also act differently
according to wsi authentication state / associated cookies.

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agomake protocols const require explicit context API BREAK
Andy Green [Fri, 11 Dec 2015 02:45:35 +0000 (10:45 +0800)]
make protocols const require explicit context API BREAK

The user protocols struct has not been const until now.

This has been painful for a while because the semantics of the protocols
struct look like it's going to be treated as const.

At context creation, the protocols struct has been getting marked with the context,
and three apis exploited that to only need to be passed a pointer to a protocol to
get access to the context.

This patch removes the two writeable members in the context (these were never directly
used by user code), changes all pointers to protocols to be const, and adds an explicit
first argument to the three affected apis so they can have access to context.

The three affected apis are these

 LWS_VISIBLE LWS_EXTERN int
-lws_callback_on_writable_all_protocol(const struct lws_protocols *protocol);
+lws_callback_on_writable_all_protocol(const struct lws_context *context,
+                                     const struct lws_protocols *protocol);

 LWS_VISIBLE LWS_EXTERN int
-lws_callback_all_protocol(const struct lws_protocols *protocol, int reason);
+lws_callback_all_protocol(struct lws_context *context,
+                         const struct lws_protocols *protocol, int reason);

 LWS_VISIBLE LWS_EXTERN void
-lws_rx_flow_allow_all_protocol(const struct lws_protocols *protocol);
+lws_rx_flow_allow_all_protocol(const struct lws_context *context,
+                              const struct lws_protocols *protocol);

unfortunately the original apis can no longer be emulated and users of them must update.

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agolws_get_ctx conversion
Andy Green [Fri, 11 Dec 2015 01:36:14 +0000 (09:36 +0800)]
lws_get_ctx conversion

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agowin open flags 3 lsb are not bitfields
Andy Green [Sun, 13 Dec 2015 22:40:53 +0000 (06:40 +0800)]
win open flags 3 lsb are not bitfields

https://github.com/warmcat/libwebsockets/issues/367

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoRevert using AI_V4MAPPED flag to getaddrinfo for Android
Yusuke Ishiguro [Fri, 11 Dec 2015 09:10:02 +0000 (18:10 +0900)]
Revert using AI_V4MAPPED flag to getaddrinfo for Android

Because getaddrinfo will return error on Android when
AI_V4MAPPED is specified. So we should use old implemntation.
Android support of IPv6 is very poor.

8 years agowindows fcntl.h
Andy Green [Thu, 10 Dec 2015 05:21:07 +0000 (13:21 +0800)]
windows fcntl.h

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoLWS_O_RDONLY to hide perversions
Andy Green [Thu, 10 Dec 2015 05:03:10 +0000 (13:03 +0800)]
LWS_O_RDONLY to hide perversions

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoosx fix unsigned signed compare error 2
Andy Green [Thu, 10 Dec 2015 05:00:15 +0000 (13:00 +0800)]
osx fix unsigned signed compare error 2

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agowindows use right perversion flgs
Andy Green [Thu, 10 Dec 2015 04:56:46 +0000 (12:56 +0800)]
windows use right perversion flgs

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoosx fix unsigned signed compare error
Andy Green [Thu, 10 Dec 2015 04:50:10 +0000 (12:50 +0800)]
osx fix unsigned signed compare error

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agolws_plat_fd implement platform default handlers
Andy Green [Wed, 9 Dec 2015 23:58:58 +0000 (07:58 +0800)]
lws_plat_fd implement platform default handlers

This is a rewrite of the patch from Soapyman here

https://github.com/warmcat/libwebsockets/pull/363

The main changes compared to Soapyman's original patch are

 - There's no new stuff in the info struct user code does any overrides
   it may want to do explicitly after lws_context_create returns

 - User overrides for file ops can call through (subclass) to the original
   platform implementation using lws_get_fops_plat()

 - A typedef is provided for plat-specific fd type

 - Public helpers are provided to allow user code to be platform-independent
   about file access, using the lws platform file operations underneath:

static inline lws_filefd_type
lws_plat_file_open(struct lws_plat_file_ops *fops, const char *filename,
   unsigned long *filelen, int flags)

static inline int
lws_plat_file_close(struct lws_plat_file_ops *fops, lws_filefd_type fd)

static inline unsigned long
lws_plat_file_seek_cur(struct lws_plat_file_ops *fops, lws_filefd_type fd,
       long offset_from_cur_pos)

static inline int
lws_plat_file_read(struct lws_plat_file_ops *fops, lws_filefd_type fd,
   unsigned long *amount, unsigned char *buf, unsigned long len)

static inline int
lws_plat_file_write(struct lws_plat_file_ops *fops, lws_filefd_type fd,
    unsigned long *amount, unsigned char *buf, unsigned long len)

There's example documentation and implementation in the test server.

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agolws_plat_fd introduce struct
SoapyMan [Wed, 9 Dec 2015 23:52:31 +0000 (07:52 +0800)]
lws_plat_fd introduce struct

Originally from

https://github.com/warmcat/libwebsockets/pull/363

Modified by AG to change the emphasis to exporting lws plat
handlers for use by the user code portably

8 years agotest client remove spamming delays
Andy Green [Thu, 10 Dec 2015 03:01:20 +0000 (11:01 +0800)]
test client remove spamming delays

Chrome seems to be able to deal with this (or my machine is now
muscular enough it doesn't care, anyway)

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean comment style in libwebsockets.h
Andy Green [Wed, 9 Dec 2015 23:50:51 +0000 (07:50 +0800)]
clean comment style in libwebsockets.h

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoarmour libwebsockets.h also put notices on abi structs in there
Andy Green [Wed, 9 Dec 2015 23:24:20 +0000 (07:24 +0800)]
armour libwebsockets.h also put notices on abi structs in there

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoplat combine inits into single lws_plat_init and provide info
Andy Green [Wed, 9 Dec 2015 23:14:16 +0000 (07:14 +0800)]
plat combine inits into single lws_plat_init and provide info

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoSubject: [PATCH] fixed not to use IPv4-mapped address for IPv6 only node
Yusuke Ishiguro [Wed, 9 Dec 2015 10:24:44 +0000 (19:24 +0900)]
Subject: [PATCH] fixed not to use IPv4-mapped address for IPv6 only node

Since IPv6 only node can not connect with IPv4-mapped address.

8 years agotest client bit more cleaning
Andy Green [Wed, 9 Dec 2015 00:07:38 +0000 (08:07 +0800)]
test client bit more cleaning

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoAccess to wsi->ssl at LWS_CALLBACK_ESTABLISHED
Alexander Bruines [Tue, 8 Dec 2015 22:31:37 +0000 (23:31 +0100)]
Access to wsi->ssl at LWS_CALLBACK_ESTABLISHED

8 years agotest client reconnect if server disappears
Andy Green [Tue, 8 Dec 2015 23:10:03 +0000 (07:10 +0800)]
test client reconnect if server disappears

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agofixed to initialize sockaddr_in6 by zero
Yusuke Ishiguro [Tue, 8 Dec 2015 10:57:19 +0000 (19:57 +0900)]
fixed to initialize sockaddr_in6 by zero

Some environment has field of sin6_scope_id inside sockaddr_in6
and it should be set to zero.

8 years agosoname bump
Andy Green [Tue, 8 Dec 2015 03:06:28 +0000 (11:06 +0800)]
soname bump

See

http://ml.libwebsockets.org/pipermail/libwebsockets/2015-December/002052.html

for the reason

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoarmour libwebsockets.h against careless enum changes affecting abi
Andy Green [Tue, 8 Dec 2015 03:04:19 +0000 (11:04 +0800)]
armour libwebsockets.h against careless enum changes affecting abi

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agocmake additionally install cmake config
Charles Prevot [Tue, 8 Dec 2015 02:26:57 +0000 (10:26 +0800)]
cmake additionally install cmake config

8 years agocoverity 155650 medium possible write to null pointer
Andy Green [Sun, 6 Dec 2015 03:07:41 +0000 (11:07 +0800)]
coverity 155650 medium possible write to null pointer

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agocoverity 155649 medium possible write to null pointer
Andy Green [Sun, 6 Dec 2015 03:04:05 +0000 (11:04 +0800)]
coverity 155649 medium possible write to null pointer

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agocoverity 155648 low dead code daemonize disabled
Andy Green [Sun, 6 Dec 2015 03:00:36 +0000 (11:00 +0800)]
coverity 155648 low dead code daemonize disabled

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agotravis coverity update
Andy Green [Sun, 6 Dec 2015 02:43:02 +0000 (10:43 +0800)]
travis coverity update

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean more whitespace 5
Andy Green [Sun, 6 Dec 2015 02:05:37 +0000 (10:05 +0800)]
clean more whitespace 5

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean more whitespace 4
Andy Green [Sun, 6 Dec 2015 01:15:27 +0000 (09:15 +0800)]
clean more whitespace 4

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean more whitespace 3
Andy Green [Sun, 6 Dec 2015 00:40:00 +0000 (08:40 +0800)]
clean more whitespace 3

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean reduce windows build warnings
Andy Green [Sun, 6 Dec 2015 00:00:03 +0000 (08:00 +0800)]
clean reduce windows build warnings

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agomore server close processing error handling precisions
Andy Green [Sat, 5 Dec 2015 22:39:51 +0000 (06:39 +0800)]
more server close processing error handling precisions

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoserver socket service close when detected do right thing
Andy Green [Sat, 5 Dec 2015 21:55:52 +0000 (05:55 +0800)]
server socket service close when detected do right thing

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean more whitespace 2
Andy Green [Sat, 5 Dec 2015 21:52:09 +0000 (05:52 +0800)]
clean more whitespace 2

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean more whitespace
Andy Green [Sat, 5 Dec 2015 13:51:47 +0000 (21:51 +0800)]
clean more whitespace

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoserver socket service close fix fail detect
Andy Green [Sat, 5 Dec 2015 13:52:16 +0000 (21:52 +0800)]
server socket service close fix fail detect

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agowindows align lws_service_fd return processing with unix
Andy Green [Sat, 5 Dec 2015 01:38:50 +0000 (09:38 +0800)]
windows align lws_service_fd return processing with unix

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agocleanups after api changes and mbed update
Andy Green [Fri, 4 Dec 2015 08:54:12 +0000 (16:54 +0800)]
cleanups after api changes and mbed update

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoattack.sh update for test server changes
Andy Green [Fri, 4 Dec 2015 04:04:59 +0000 (12:04 +0800)]
attack.sh update for test server changes

Currently he can survive all the tests correctly

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agofix Uri Args header name
Andy Green [Fri, 4 Dec 2015 03:57:48 +0000 (11:57 +0800)]
fix Uri Args header name

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoapi rationalization fix replaces in compatibility defines
Andy Green [Fri, 4 Dec 2015 03:34:49 +0000 (11:34 +0800)]
api rationalization fix replaces in compatibility defines

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoclean tidy the worst whitespace alignment probs due to mass token name length changes
Andy Green [Fri, 4 Dec 2015 03:30:53 +0000 (11:30 +0800)]
clean tidy the worst whitespace alignment probs due to mass token name length changes

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoapi rationalization: eliminate all libwebsocket[s]_ prefixes
Andy Green [Fri, 4 Dec 2015 03:08:32 +0000 (11:08 +0800)]
api rationalization: eliminate all libwebsocket[s]_ prefixes

This nukes all the oldstyle prefixes except in the compatibility code.

struct libwebsockets becomes struct lws too.

The api docs are updated accordingly as are the READMEs that mention
those apis.

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoapi rationalization add cmake switch to export old api wrappers
Andy Green [Fri, 4 Dec 2015 02:39:23 +0000 (10:39 +0800)]
api rationalization add cmake switch to export old api wrappers

This is off by default, use

 -D LWS_WITH_OLD_API_WRAPPERS=1

on cmake to get the old api names exported from the library as wrappers
around the new api names.

This allows the library to continue to be compatible with apps that are
not rebuilt with the new libwebsockets.h api compatibility defines.

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoapi rationalization eliminate oldstyle internal api names
Andy Green [Fri, 4 Dec 2015 01:23:56 +0000 (09:23 +0800)]
api rationalization eliminate oldstyle internal api names

Between changing to lws_ a few years ago and the previous two
patches migrating the public apis, there are only a few
internal functions left using libwebsocket_*.

Change those to also use lws_ without regard to compatibility
since they were never visible outside the library.

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoapi rationalization use new names internally
Andy Green [Fri, 4 Dec 2015 00:43:54 +0000 (08:43 +0800)]
api rationalization use new names internally

Change all internal uses of rationalized public apis to reflect the
new names.

Theer are a few things that got changed as side effect of search/replace
matches, but these are almost all internal.  I added a compatibility define
for the public enum that got renamed.

Theoretically existing code should not notice the difference from these
two patches.  And new code will find the new names.

https://github.com/warmcat/libwebsockets/issues/357

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoapi rationalization: introduce public api compatibility defines
Andy Green [Thu, 3 Dec 2015 23:55:17 +0000 (07:55 +0800)]
api rationalization: introduce public api compatibility defines

Just this is enough to be buildable and allow usage of new defines
for the public api.

https://github.com/warmcat/libwebsockets/issues/357

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoassert.h move to private header
Andy Green [Thu, 3 Dec 2015 23:22:44 +0000 (07:22 +0800)]
assert.h move to private header

https://github.com/warmcat/libwebsockets/issues/356

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoFix some minor typos.
Peter Pentchev [Thu, 3 Dec 2015 13:55:11 +0000 (15:55 +0200)]
Fix some minor typos.

8 years agossl zero return indicates shutdown
Andy Green [Thu, 3 Dec 2015 13:37:34 +0000 (21:37 +0800)]
ssl zero return indicates shutdown

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoHandle pending SSL reads which would otherwise not trigger a POLLIN.
Andrew Canaday [Wed, 2 Dec 2015 20:13:56 +0000 (15:13 -0500)]
Handle pending SSL reads which would otherwise not trigger a POLLIN.

8 years agossl set ssl to NULL on close
Andrew Canaday [Thu, 3 Dec 2015 01:44:15 +0000 (09:44 +0800)]
ssl set ssl to NULL on close

8 years agoAllow zero-length pong to be received by server
Andrejs Hanins [Tue, 1 Dec 2015 12:44:33 +0000 (14:44 +0200)]
Allow zero-length pong to be received by server

Client code already allows zero-length pongs

8 years agoosx clang blows up if pthreads flag at link time 2
Andy Green [Sun, 29 Nov 2015 12:17:49 +0000 (20:17 +0800)]
osx clang blows up if pthreads flag at link time 2

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoosx clang blows up if pthreads flag at link time
Andy Green [Sun, 29 Nov 2015 11:41:13 +0000 (19:41 +0800)]
osx clang blows up if pthreads flag at link time

Signed-off-by: Andy Green <andy.green@linaro.org>
8 years agoDefine 'daemonize' flag if LWS_NO_DAEMONIZE is not defined.
Andrew Canaday [Sun, 29 Nov 2015 11:32:02 +0000 (19:32 +0800)]
Define 'daemonize' flag if LWS_NO_DAEMONIZE is not defined.