pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/chat/jabberd2



Module Name:    pkgsrc
Committed By:   dbj
Date:           Sat Feb  6 15:20:15 UTC 2021

Modified Files:
        pkgsrc/chat/jabberd2: distinfo
Added Files:
        pkgsrc/chat/jabberd2/patches: patch-sx_websocket.c

Log Message:
chat/jabberd2: use htons instead of non-portable htobe16


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 pkgsrc/chat/jabberd2/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/chat/jabberd2/patches/patch-sx_websocket.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/chat/jabberd2/distinfo
diff -u pkgsrc/chat/jabberd2/distinfo:1.43 pkgsrc/chat/jabberd2/distinfo:1.44
--- pkgsrc/chat/jabberd2/distinfo:1.43  Fri Nov  2 12:15:25 2018
+++ pkgsrc/chat/jabberd2/distinfo       Sat Feb  6 15:20:15 2021
@@ -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

Added files:

Index: pkgsrc/chat/jabberd2/patches/patch-sx_websocket.c
diff -u /dev/null pkgsrc/chat/jabberd2/patches/patch-sx_websocket.c:1.1
--- /dev/null   Sat Feb  6 15:20:16 2021
+++ pkgsrc/chat/jabberd2/patches/patch-sx_websocket.c   Sat Feb  6 15:20:15 2021
@@ -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