pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/chat/jabberd2 chat/jabberd2: use htons instead of non-...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f9a24ada7ec0
branches: trunk
changeset: 446323:f9a24ada7ec0
user: dbj <dbj%pkgsrc.org@localhost>
date: Sat Feb 06 15:20:15 2021 +0000
description:
chat/jabberd2: use htons instead of non-portable htobe16
diffstat:
chat/jabberd2/distinfo | 3 ++-
chat/jabberd2/patches/patch-sx_websocket.c | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletions(-)
diffs (41 lines):
diff -r 60c5e2d6d1f4 -r f9a24ada7ec0 chat/jabberd2/distinfo
--- a/chat/jabberd2/distinfo Sat Feb 06 15:15:08 2021 +0000
+++ b/chat/jabberd2/distinfo Sat Feb 06 15:20:15 2021 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.43 2018/11/02 12:15:25 gdt Exp $
+$NetBSD: distinfo,v 1.44 2021/02/06 15:20:15 dbj Exp $
SHA1 (jabberd-2.7.0.tar.xz) = efd638bde131cbe5e35c376c875bd92a2ed5948c
RMD160 (jabberd-2.7.0.tar.xz) = 61b7858514f4cdeadbe5f946d6ae8f42cbe6926a
SHA512 (jabberd-2.7.0.tar.xz) = 2a5d134572330a38366a17cf8b3fc6fadf56eddf604003d75cd976bd385b5d8392b01dc149e3a2962be3c340eb23429e83db25b608b9ab84f328603d3ba447da
Size (jabberd-2.7.0.tar.xz) = 1560872 bytes
SHA1 (patch-Makefile.in) = 31d8dc4a5446e96079e1016afb45dc7a602b98c9
+SHA1 (patch-sx_websocket.c) = 112f5fb6efc3254548b77cd46b310ce984288748
diff -r 60c5e2d6d1f4 -r f9a24ada7ec0 chat/jabberd2/patches/patch-sx_websocket.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/jabberd2/patches/patch-sx_websocket.c Sat Feb 06 15:20:15 2021 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-sx_websocket.c,v 1.1 2021/02/06 15:20:15 dbj Exp $
+
+use htons instead of non-portable htobe16
+
+--- sx/websocket.c.orig 2018-04-22 09:41:35.000000000 +0000
++++ sx/websocket.c
+@@ -214,7 +214,7 @@ int libwebsock_close_with_reason(sx_t s,
+ unsigned short code_be;
+ char buf[128]; //w3 spec on WebSockets API (http://dev.w3.org/html5/websockets/) says reason shouldn't be over 123 bytes. I concur.
+ len = 2;
+- code_be = htobe16(code);
++ code_be = htons(code);
+ memcpy(buf, &code_be, 2);
+ if (reason) {
+ len += snprintf(buf + 2, 124, "%s", reason);
+@@ -235,7 +235,7 @@ int libwebsock_close(sx_t s, _sx_websock
+ void libwebsock_fail_connection(sx_t s, _sx_websocket_conn_t sc, unsigned short close_code) {
+ char close_frame[4] = { 0x88, 0x02, 0x00, 0x00 };
+ unsigned short *code_be = (unsigned short *) &close_frame[2];
+- *code_be = htobe16(WS_CLOSE_PROTOCOL_ERROR);
++ *code_be = htons(WS_CLOSE_PROTOCOL_ERROR);
+
+ sx_buf_t buf = _sx_buffer_new(NULL, sizeof(close_frame), NULL, NULL);
+ memcpy(buf->data, close_frame, buf->len);
Home |
Main Index |
Thread Index |
Old Index