From 44e860642bcdd238bd3ee06482d953ee4a6e14de Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 11 Oct 2020 07:43:46 +0100 Subject: [PATCH] docs: switch to use main --- READMEs/README.build.md | 2 +- READMEs/README.problems.md | 6 ++--- READMEs/README.release-policy.md | 8 +++---- READMEs/README.test-apps.md | 2 +- READMEs/README.vulnerability-reporting.md | 2 +- bug_report.md | 5 +++-- lib/core-net/client/connect4.c | 2 +- lib/core-net/close.c | 2 +- lib/core-net/service.c | 4 ++-- lib/misc/fts/README.md | 2 +- lib/plat/freertos/freertos-init.c | 2 +- lib/plat/optee/lws-plat-optee.c | 2 +- lib/plat/unix/unix-init.c | 2 +- lib/roles/cgi/cgi-server.c | 2 +- lib/roles/cgi/private-lib-roles-cgi.h | 2 +- lib/roles/h2/http2.c | 2 +- lib/roles/http/client/client-http.c | 2 +- lib/roles/http/private-lib-roles-http.h | 2 +- lib/roles/mqtt/client/client-mqtt.c | 22 ------------------- lib/secure-streams/secure-streams-serialize.c | 2 +- lib/tls/tls-client.c | 2 +- lwsws/main.c | 2 +- 22 files changed, 29 insertions(+), 50 deletions(-) diff --git a/READMEs/README.build.md b/READMEs/README.build.md index 693a68440..0b3db34b7 100644 --- a/READMEs/README.build.md +++ b/READMEs/README.build.md @@ -545,7 +545,7 @@ All "foreign" cross-built binaries are sent into `/tmp/cross` so they cannot be 1) `cd /tmp` -2) `wget -O mytoolchainfile https://raw.githubusercontent.com/warmcat/libwebsockets/master/contrib/cross-arm-linux-gnueabihf.cmake` +2) `wget -O mytoolchainfile https://raw.githubusercontent.com/warmcat/libwebsockets/main/contrib/cross-arm-linux-gnueabihf.cmake` 3) Edit `/tmp/mytoolchainfile` adapting `CROSS_PATH`, `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER` to reflect your toolchain install dir and path to your toolchain C and C++ compilers respectively. For my case: diff --git a/READMEs/README.problems.md b/READMEs/README.problems.md index 6d12f6fdb..9313582f8 100644 --- a/READMEs/README.problems.md +++ b/READMEs/README.problems.md @@ -8,15 +8,15 @@ Older versions of lws don't attract any new work after they are released (see [the release policy](https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.release-policy.md) for details); for a while they will get backported bugfixes but that's it. -All new work and bugfixes happen on master branch. +All new work and bugfixes happen on `main` branch. Old, old versions may be convenient for you to use for some reason. But unless you pay for support or have contributed work to lws so we feel we owe you some consideration, nobody else has any reason to particularly care about solving -issues on ancient versions. Whereas if the problem exists on master, and can be +issues on ancient versions. Whereas if the problem exists on `main`, and can be reproduced by developers, it usually gets attention, often immediately. -If the problem doesn't exist on master, you can either use master or check also +If the problem doesn't exist on `main`, you can either use `main` or check also the -stable branch of the last released version to see if it was already solved there. diff --git a/READMEs/README.release-policy.md b/READMEs/README.release-policy.md index 4fc4cb345..322b91895 100644 --- a/READMEs/README.release-policy.md +++ b/READMEs/README.release-policy.md @@ -30,16 +30,16 @@ runtime tests, so if it is passing CI as it usually is then it's probably in usable shape. See "Why no history on development" below for why it's managed like that. -![all work happens on master](../doc-assets/lws-relpol-1.svg) +![all work happens on main](../doc-assets/lws-relpol-1.svg) -If you have patches (you are a hero) they should be targeted at master. +If you have patches (you are a hero) they should be targeted at `main`. To follow such a branch, `git pull` is the wrong tool... the starting point of what you currently have may no longer exist remotely due to rearranging the patches there. Instead use a flow like this: ``` - $ git fetch https://libwebsockets.org/repo/libwebsockets +master:m && git reset --hard m + $ git fetch https://libwebsockets.org/repo/libwebsockets +main:m && git reset --hard m ``` This fetches current remote development branch into local branch `m`, and then forces your @@ -83,7 +83,7 @@ madness. When new stable releases are made, the soname is bumped reflecting the API is different than that of previous versions. -![backports from master to stable](../doc-assets/lws-relpol-3.svg) +![backports from main to stable](../doc-assets/lws-relpol-3.svg) If there is something you need in a later lws version that is not backported, you need to either backport it yourself or use a later lws version. diff --git a/READMEs/README.test-apps.md b/READMEs/README.test-apps.md index 5ba6567e4..4ae0b929a 100644 --- a/READMEs/README.test-apps.md +++ b/READMEs/README.test-apps.md @@ -81,7 +81,7 @@ background and return immediately. In this daemonized mode all stderr is disabled and logging goes only to syslog, eg, `/var/log/messages` or similar. The server maintains a lockfile at `/tmp/.lwsts-lock` that contains the pid -of the master process, and deletes this file when the master process +of the parent process, and deletes this file when the parent process terminates. To stop the daemon, do diff --git a/READMEs/README.vulnerability-reporting.md b/READMEs/README.vulnerability-reporting.md index ae06435df..8cd893142 100644 --- a/READMEs/README.vulnerability-reporting.md +++ b/READMEs/README.vulnerability-reporting.md @@ -7,6 +7,6 @@ direct email. ## Procedure for announcing vulnerability fixes The problem and fixed versions will be announced on the -libwebsockets mailing list and a note added to the master +libwebsockets mailing list and a note added to the `main` README.md. diff --git a/bug_report.md b/bug_report.md index 7958af07a..07a81d144 100644 --- a/bug_report.md +++ b/bug_report.md @@ -1,8 +1,9 @@ ** What version of lws ** -"vx.y.z" or "01234567 from master thismorning" etc +"vx.y.z" or "01234567 from `main` thismorning" etc -If it's much older than last stable release, we will likely suggest you try that or master. +If it's much older than last stable release, we will likely suggest you try that +or `main`. ** What platform and arch? ** diff --git a/lib/core-net/client/connect4.c b/lib/core-net/client/connect4.c index 7bd03ece7..a31eebfae 100644 --- a/lib/core-net/client/connect4.c +++ b/lib/core-net/client/connect4.c @@ -150,7 +150,7 @@ send_hs: * for anybody on his client transaction queue that is in * LRS_H1C_ISSUE_HANDSHAKE2, and let them write. * - * If we are trying to do this too early, before the master + * If we are trying to do this too early, before the network * connection has written his own headers, then it will just * wait in the queue until it's possible to send them. */ diff --git a/lib/core-net/close.c b/lib/core-net/close.c index 3ed505354..b8f6650a7 100644 --- a/lib/core-net/close.c +++ b/lib/core-net/close.c @@ -336,7 +336,7 @@ __lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason, // if (wsi->parent->child_list == wsi && !wsi->sibling_list) // lws_cgi_remove_and_kill(wsi->parent); - /* end the binding between us and master */ + /* end the binding between us and network connection */ if (wsi->parent->http.cgi && wsi->parent->http.cgi->lsp) wsi->parent->http.cgi->lsp->stdwsi[(int)wsi->lsp_channel] = NULL; diff --git a/lib/core-net/service.c b/lib/core-net/service.c index b195aac2e..62da30760 100644 --- a/lib/core-net/service.c +++ b/lib/core-net/service.c @@ -126,8 +126,8 @@ lws_handle_POLLOUT_event(struct lws *wsi, struct lws_pollfd *pollfd) #ifdef LWS_WITH_CGI /* - * A cgi master's wire protocol remains h1 or h2. He is just getting - * his data from his child cgis. + * A cgi connection's wire protocol remains h1 or h2. He is just + * getting his data from his child cgis. */ if (wsi->http.cgi) { /* also one shot */ diff --git a/lib/misc/fts/README.md b/lib/misc/fts/README.md index e85fee28c..71c1eecc9 100644 --- a/lib/misc/fts/README.md +++ b/lib/misc/fts/README.md @@ -124,7 +124,7 @@ Peak alloc|78MiB Serialization time|202ms Trie File size|347MiB -To index libwebsockets master under the same conditions: +To index libwebsockets main branch under the same conditions: Name|Value ---|--- diff --git a/lib/plat/freertos/freertos-init.c b/lib/plat/freertos/freertos-init.c index e7862c5fc..49f5b5d9a 100644 --- a/lib/plat/freertos/freertos-init.c +++ b/lib/plat/freertos/freertos-init.c @@ -90,7 +90,7 @@ lws_plat_init(struct lws_context *context, } #endif - /* master context has the global fd lookup array */ + /* context has the global fd lookup array */ context->lws_lookup = lws_zalloc(sizeof(struct lws *) * context->max_fds, "esp32 lws_lookup"); if (context->lws_lookup == NULL) { diff --git a/lib/plat/optee/lws-plat-optee.c b/lib/plat/optee/lws-plat-optee.c index 6171fafd5..e36b76865 100644 --- a/lib/plat/optee/lws-plat-optee.c +++ b/lib/plat/optee/lws-plat-optee.c @@ -198,7 +198,7 @@ lws_plat_init(struct lws_context *context, const struct lws_context_creation_info *info) { #if defined(LWS_WITH_NETWORK) - /* master context has the global fd lookup array */ + /* context has the global fd lookup array */ context->lws_lookup = lws_zalloc(sizeof(struct lws *) * context->max_fds, "lws_lookup"); if (context->lws_lookup == NULL) { diff --git a/lib/plat/unix/unix-init.c b/lib/plat/unix/unix-init.c index 9d72598e5..d448dccf3 100644 --- a/lib/plat/unix/unix-init.c +++ b/lib/plat/unix/unix-init.c @@ -102,7 +102,7 @@ lws_plat_init(struct lws_context *context, int fd; #if defined(LWS_WITH_NETWORK) /* - * master context has the process-global fd lookup array. This can be + * context has the process-global fd lookup array. This can be * done two different ways now; one or the other is done depending on if * info->fd_limit_per_thread was snonzero * diff --git a/lib/roles/cgi/cgi-server.c b/lib/roles/cgi/cgi-server.c index f37a2b4b7..5a39116d0 100644 --- a/lib/roles/cgi/cgi-server.c +++ b/lib/roles/cgi/cgi-server.c @@ -118,7 +118,7 @@ lws_cgi(struct lws *wsi, const char * const *exec_array, int n, m = 0, i, uritok = -1, c; /* - * give the master wsi a cgi struct + * give the cgi stream wsi a cgi struct */ wsi->http.cgi = lws_zalloc(sizeof(*wsi->http.cgi), "new cgi"); diff --git a/lib/roles/cgi/private-lib-roles-cgi.h b/lib/roles/cgi/private-lib-roles-cgi.h index 2ca770510..8eff589c0 100644 --- a/lib/roles/cgi/private-lib-roles-cgi.h +++ b/lib/roles/cgi/private-lib-roles-cgi.h @@ -50,7 +50,7 @@ enum { struct lws; -/* wsi who is master of the cgi points to an lws_cgi */ +/* wsi who is owns the cgi points to an lws_cgi */ struct lws_cgi { struct lws_cgi *cgi_list; diff --git a/lib/roles/h2/http2.c b/lib/roles/h2/http2.c index cce4208ee..ff2ec158b 100644 --- a/lib/roles/h2/http2.c +++ b/lib/roles/h2/http2.c @@ -1461,7 +1461,7 @@ lws_h2_parse_end_of_frame(struct lws *wsi) h2n->peer_set.s[H2SET_INITIAL_WINDOW_SIZE]; lwsl_info("%s: initial tx credit for us to " - "write on master %p: %d\n", __func__, + "write on nwsi %p: %d\n", __func__, wsi, (int)wsi->txc.tx_cr); wsi->h2.initialized = 1; } diff --git a/lib/roles/http/client/client-http.c b/lib/roles/http/client/client-http.c index 2bba1ee85..f1735289f 100644 --- a/lib/roles/http/client/client-http.c +++ b/lib/roles/http/client/client-http.c @@ -194,7 +194,7 @@ start_ws_handshake: * negotiated "h2" or connected as clear text * with http/2 prior knowledge. * - * So this is it, we are an h2 master client connection + * So this is it, we are an h2 nwsi client connection * now, not an h1 client connection. */ diff --git a/lib/roles/http/private-lib-roles-http.h b/lib/roles/http/private-lib-roles-http.h index 5e15effd4..716729985 100644 --- a/lib/roles/http/private-lib-roles-http.h +++ b/lib/roles/http/private-lib-roles-http.h @@ -247,7 +247,7 @@ struct _lws_http_mode_related { struct lws_access_log access_log; #endif #ifdef LWS_WITH_CGI - struct lws_cgi *cgi; /* wsi being cgi master have one of these */ + struct lws_cgi *cgi; /* wsi being cgi stream have one of these */ #endif #if defined(LWS_WITH_HTTP_STREAM_COMPRESSION) struct lws_compression_support *lcs; diff --git a/lib/roles/mqtt/client/client-mqtt.c b/lib/roles/mqtt/client/client-mqtt.c index f6c2a374a..4ab4816ba 100644 --- a/lib/roles/mqtt/client/client-mqtt.c +++ b/lib/roles/mqtt/client/client-mqtt.c @@ -273,28 +273,6 @@ lws_mqtt_client_socket_service(struct lws *wsi, struct lws_pollfd *pollfd, lws_det_lat_cb(wsi->a.context, &wsi->detlat); } #endif -#if 0 - if (wsi->client_h2_alpn) { - /* - * We connected to the server and set up tls, and - * negotiated "h2". - * - * So this is it, we are an h2 master client connection - * now, not an h1 client connection. - */ -#if defined(LWS_WITH_TLS) - lws_tls_server_conn_alpn(wsi); -#endif - - /* send the H2 preface to legitimize the connection */ - if (lws_h2_issue_preface(wsi)) { - cce = "error sending h2 preface"; - goto bail3; - } - - break; - } -#endif /* fallthru */ diff --git a/lib/secure-streams/secure-streams-serialize.c b/lib/secure-streams/secure-streams-serialize.c index de06744f7..c2eca6a54 100644 --- a/lib/secure-streams/secure-streams-serialize.c +++ b/lib/secure-streams/secure-streams-serialize.c @@ -1138,7 +1138,7 @@ payload_ff: * * The reason is he may set metadata in CREATING, and * we will try to do writeables to sync the stream to - * master and ultimately bring up the onward connection now + * proxy and ultimately bring up the onward connection * now we are in LOCAL_CONNECTED. We need to do the * CREATING now so we'll know the metadata to sync. */ diff --git a/lib/tls/tls-client.c b/lib/tls/tls-client.c index 38807f72c..ed1a46c44 100644 --- a/lib/tls/tls-client.c +++ b/lib/tls/tls-client.c @@ -205,7 +205,7 @@ lws_client_create_tls(struct lws *wsi, const char **pcce, int do_c1) * We connected to the server and set up tls, and * negotiated "h2". * - * So this is it, we are an h2 master client connection + * So this is it, we are an h2 nwsi client connection * now, not an h1 client connection. */ #if defined(LWS_WITH_TLS) diff --git a/lwsws/main.c b/lwsws/main.c index e3bdb13e5..7b2b663bc 100644 --- a/lwsws/main.c +++ b/lwsws/main.c @@ -220,7 +220,7 @@ reload_handler(int signum) case SIGINT: case SIGTERM: case SIGKILL: - fprintf(stderr, "master process waiting 2s...\n"); + fprintf(stderr, "parent process waiting 2s...\n"); sleep(2); /* give children a chance to deal with the signal */ fprintf(stderr, "killing service processes\n"); for (m = 0; m < (int)LWS_ARRAY_SIZE(pids); m++)