Update to wslay 1.1.1 .

A minor fix, but let's stay in sync.
This commit is contained in:
Fabio Alessandrelli 2020-07-02 16:00:56 +02:00
parent f4aea93537
commit d988b0d1a3
3 changed files with 8 additions and 8 deletions

View File

@ -623,7 +623,7 @@ Patches in the `patches` directory should be re-applied after updates.
## wslay ## wslay
- Upstream: https://github.com/tatsuhiro-t/wslay - Upstream: https://github.com/tatsuhiro-t/wslay
- Version: 1.1.0 (2018) - Version: 1.1.1 (2020)
- License: MIT - License: MIT
File extracted from upstream release tarball: File extracted from upstream release tarball:

View File

@ -26,6 +26,6 @@
#define WSLAYVER_H #define WSLAYVER_H
/* Version number of wslay release */ /* Version number of wslay release */
#define WSLAY_VERSION "1.1.0" #define WSLAY_VERSION "1.1.1"
#endif /* WSLAYVER_H */ #endif /* WSLAYVER_H */

View File

@ -730,11 +730,11 @@ int wslay_event_recv(wslay_event_context_ptr ctx)
return r; return r;
} }
} else if(ctx->imsg->opcode == WSLAY_PING) { } else if(ctx->imsg->opcode == WSLAY_PING) {
struct wslay_event_msg arg; struct wslay_event_msg pong_arg;
arg.opcode = WSLAY_PONG; pong_arg.opcode = WSLAY_PONG;
arg.msg = msg; pong_arg.msg = msg;
arg.msg_length = ctx->imsg->msg_length; pong_arg.msg_length = ctx->imsg->msg_length;
if((r = wslay_event_queue_msg(ctx, &arg)) && if((r = wslay_event_queue_msg(ctx, &pong_arg)) &&
r != WSLAY_ERR_NO_MORE_MSG) { r != WSLAY_ERR_NO_MORE_MSG) {
ctx->read_enabled = 0; ctx->read_enabled = 0;
free(msg); free(msg);
@ -885,7 +885,7 @@ int wslay_event_send(wslay_event_context_ptr ctx)
r = ctx->omsg->read_callback(ctx, ctx->obuf, sizeof(ctx->obuf), r = ctx->omsg->read_callback(ctx, ctx->obuf, sizeof(ctx->obuf),
&ctx->omsg->source, &ctx->omsg->source,
&eof, ctx->user_data); &eof, ctx->user_data);
if(r == 0) { if(r == 0 && eof == 0) {
break; break;
} else if(r < 0) { } else if(r < 0) {
ctx->write_enabled = 0; ctx->write_enabled = 0;