[Libwebsockets] A couple of patches - typos and a bash declaration

Peter Pentchev roam at ringlet.net
Thu Oct 1 11:09:04 CEST 2015


Hi,

Thanks for writing and maintaining libwebsockets!

What do you think about the attached couple of patches - a trivial one
marking a shell script as using Bash as an interpreter, since it uses
Bash-specific constructs, and another one fixing a couple of typos and
grammatical errors?

I tried to submit these patches through the Trac interface a couple of
weeks ago, but it turned out that with some data loss last year I also
lost my Trac password; it seems that the e-mail that I wrote to Andy
Green's personal address about it may have been lost somewhere.  Anyway,
here are the patches; if there's a way for somebody to reset the Trac
password for the 'roam' user (registered with the roam at ringlet.net
e-mail address), I'd be happy to also submit them there.

ObXThread: It's kind of embarrassing for me to admit this, but
submitting these two patches upstream was pretty much the last thing
that was holding me up from declaring the Debian package of
libwebsockets-1.4 pretty much fit for releasing; and yes, I could've
sent them to this mailing list earlier.  Sorry about the delay there!

Thanks in advance for taking a look at the patches, and thanks again for
libwebsockets!

G'luck,
Peter

-- 
Peter Pentchev  roam at ringlet.net roam at FreeBSD.org pp at storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
-------------- next part --------------
Description: Use /bin/bash as a script interpreter.
 The test-server/attack.sh script makes use of several features only
 available in the Bash shell, so mark it accordingly.
Forwarded: not-yet
Author: Peter Pentchev <roam at ringlet.net>
Last-Update: 2015-08-24

--- a/test-server/attack.sh
+++ b/test-server/attack.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # attack the test server and try to make it fall over
 #
-------------- next part --------------
Description: Fix some typographical and grammatical errors.
Forwarded: not-yet
Author: Peter Pentchev <roam at ringlet.net>
Last-Update: 2015-08-30

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,10 +34,10 @@
 endif()
 
 option(LWS_WITH_SSL "Include SSL support (default OpenSSL, CyaSSL if LWS_USE_CYASSL is set)" ON)
-option(LWS_SSL_CLIENT_USE_OS_CA_CERTS "SSL support should make use of OS installed CA root certs" ON)
+option(LWS_SSL_CLIENT_USE_OS_CA_CERTS "SSL support should make use of the OS-installed CA root certs" ON)
 option(LWS_USE_EXTERNAL_ZLIB "Search the system for ZLib instead of using the included one (on Windows)" OFF)
-option(LWS_USE_CYASSL "Use CyaSSL replacement for OpenSSL. When settings this, you also need to specify LWS_CYASSL_LIB and LWS_CYASSL_INCLUDE_DIRS" OFF)
-option(LWS_WITHOUT_BUILTIN_GETIFADDRS "Don't use BSD getifaddrs implementation from libwebsockets if it is missing (this will result in a compilation error) ... Default is your libc provides it. On some systems such as uclibc it doesn't exist." OFF)
+option(LWS_USE_CYASSL "Use CyaSSL replacement for OpenSSL. When setting this, you also need to specify LWS_CYASSL_LIB and LWS_CYASSL_INCLUDE_DIRS" OFF)
+option(LWS_WITHOUT_BUILTIN_GETIFADDRS "Don't use the BSD getifaddrs implementation from libwebsockets if it is missing (this will result in a compilation error) ... The default is to assume that your libc provides it. On some systems such as uclibc it doesn't exist." OFF)
 option(LWS_WITHOUT_CLIENT "Don't build the client part of the library" OFF)
 option(LWS_WITHOUT_SERVER "Don't build the server part of the library" OFF)
 option(LWS_LINK_TESTAPPS_DYNAMIC "Link the test apps to the shared version of the library. Default is to link statically" OFF)
@@ -62,7 +62,7 @@
 set(LWS_INSTALL_EXAMPLES_DIR  bin CACHE PATH "Installation directory for example files")
 
 if (LWS_WITHOUT_CLIENT AND LWS_WITHOUT_SERVER)
-	message(FATAL_ERROR "Makes no sense to compile without both client or server.")
+	message(FATAL_ERROR "Makes no sense to compile without both client and server.")
 endif()
 
 # The base dir where the test-apps look for the SSL certs.
@@ -219,7 +219,7 @@
 CHECK_INCLUDE_FILE(vfork.h HAVE_VFORK_H)
 CHECK_INCLUDE_FILE(zlib.h HAVE_ZLIB_H)
 
-# TODO: These can be tested if they actually work also...
+# TODO: These can also be tested to see whether they actually work...
 set(HAVE_WORKING_FORK HAVE_FORK)
 set(HAVE_WORKING_VFORK HAVE_VFORK)
 
@@ -492,7 +492,7 @@
 
 		# Additional to the root directory we need to include
 		# the cyassl/ subdirectory which contains the OpenSSL
-		# compatability layer headers.
+		# compatibility layer headers.
 		foreach(inc ${LWS_CYASSL_INCLUDE_DIRS})
 			include_directories("${inc}" "${inc}/cyassl")
 		endforeach()
--- a/win32port/win32helpers/gettimeofday.c
+++ b/win32port/win32helpers/gettimeofday.c
@@ -1,5 +1,5 @@
 #include <time.h>
-#include <windows.h> //I've ommited context line
+#include <windows.h> //I've omitted context line
 
 #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
   #define DELTA_EPOCH_IN_MICROSECS  11644473600000000Ui64
--- a/lib/daemonize.c
+++ b/lib/daemonize.c
@@ -41,7 +41,7 @@
 
 	switch (signum) {
 
-	case SIGALRM: /* timedout daemonizing */
+	case SIGALRM: /* timed out daemonizing */
 		exit(1);
 		break;
 
@@ -59,7 +59,7 @@
 		sent = write(fd, sz, len);
 		if (sent != len)
 			fprintf(stderr,
-			  "unable write pid to lock file %s, code=%d (%s)\n",
+			  "unable to write pid to lock file %s, code=%d (%s)\n",
 					     lock_path, errno, strerror(errno));
 
 		close(fd);
@@ -130,7 +130,7 @@
 	}
 	strcpy(lock_path, _lock_path);
 
-	/* Trap signals that we expect to recieve */
+	/* Trap signals that we expect to receive */
 	signal(SIGCHLD, child_handler);	/* died */
 	signal(SIGUSR1, child_handler); /* was happy */
 	signal(SIGALRM, child_handler); /* timeout daemonizing */
--- a/lib/base64-decode.c
+++ b/lib/base64-decode.c
@@ -34,7 +34,7 @@
  *
  * I cleaned it up quite a bit to match the (linux kernel) style of the rest
  * of libwebsockets; this version is under LGPL2 like the rest of libwebsockets
- * since he explictly allows sublicensing, but I give the URL above so you can
+ * since he explicitly allows sublicensing, but I give the URL above so you can
  * get the original with Bob's super-liberal terms directly if you prefer.
  */
 
--- a/win32port/win32helpers/gettimeofday.h
+++ b/win32port/win32helpers/gettimeofday.h
@@ -9,7 +9,7 @@
 #endif
 #endif
 
-#include <windows.h> //I've ommited context line.
+#include <windows.h> //I've omitted context line.
 #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
   #define DELTA_EPOCH_IN_MICROSECS  11644473600000000Ui64
 #else
@@ -28,4 +28,4 @@
 #endif
 
 
-#endif
\ No newline at end of file
+#endif
--- a/README.build.md
+++ b/README.build.md
@@ -141,7 +141,7 @@
 
 Unix GUI
 --------
-If you have a curses enabled build you simply type:
+If you have a curses-enabled build you simply type:
 (not all packages include this, my debian install does not for example).
 
 	ccmake
@@ -156,7 +156,7 @@
 CyaSSL is a lightweight SSL library targeted at embedded system:
 http://www.yassl.com/yaSSL/Products-cyassl.html
 
-It contains a OpenSSL compatability layer which makes it possible to pretty
+It contains a OpenSSL compatibility layer which makes it possible to pretty
 much link to it instead of OpenSSL, giving a much smaller footprint.
 
 **NOTE**: cyassl needs to be compiled using the `--enable-opensslextra` flag for
@@ -203,7 +203,7 @@
 
 Cross compiling
 ---------------
-To enable cross compiling **libwebsockets** using CMake you need to create
+To enable cross-compiling **libwebsockets** using CMake you need to create
 a "Toolchain file" that you supply to CMake when generating your build files.
 CMake will then use the cross compilers and build paths specified in this file
 to look for dependencies and such.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20151001/d72be7e8/attachment.asc>


More information about the Libwebsockets mailing list