From 80d5ca4bf1250ded0a4614d558165619cb8b39f1 Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 17 Jul 2022 14:35:45 +1000 Subject: Spellung foxes, thanks to codespell. --- src/sledjchisl/sledjchisl.c | 82 ++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index cddb167..0f05001 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -23,7 +23,7 @@ config SLEDJCHISL start Welcome.shini start "Welcome sim" Start a sim or everything. - -q when starting everything wont show the tmux console. + -q when starting everything won't show the tmux console. backup backup -m backup -m "Joan Smith" @@ -78,7 +78,7 @@ config SLEDJCHISL // TODO - remember to rebuild all of toybox if any of the above changes. // Toybox's strend overrides another strend that causes MariaDB library to crash. Renaming it to tb_strend helps. -// I deal with that by using a sed invokation when building toybox. +// I deal with that by using a sed invocation when building toybox. #define FOR_sledjchisl #include "toys.h" @@ -117,7 +117,7 @@ They are obsolete now, should remove them. #else extern char **environ; #endif -// Don't overide standard stdio stuff. +// Don't override standard stdio stuff. #define NO_FCGI_DEFINES #include #undef NO_FCGI_DEFINES @@ -144,7 +144,7 @@ extern char **environ; #include "lib/json-builder.h" // Both my_config.h and fcgi_config.h define the same PACKAGE* variables, which we don't use anyway, -// I deal with that by using a sed invokation when building fcgi2. +// I deal with that by using a sed invocation when building fcgi2. // https://mariadb.com/kb/en/about-mariadb-connector-c/ Official docs. // http://dev.mysql.com/doc/refman/5.5/en/c-api-function-overview.html MySQL docs. @@ -571,7 +571,7 @@ qlist_t *dbRequests; // TODO - log to file. The problem is we don't know where to log until after we have loaded the configs, and before that we are spewing log messages. // Now that we are using spawn-fcgi, all the logs are going to STDERR, which we can capture and write to a file. -// Unfortunately spawn-fcgi in deamon mode sends all the output to /dev/null or something. +// Unfortunately spawn-fcgi in daemon mode sends all the output to /dev/null or something. // A better idea, when we spawn tmux or spawn-fcgi, capture STDERR, full log everything to that, filtered log to the tmux console (STDOUT). // Then we can use STDOUT / STDIN to run the console stuff. @@ -2297,7 +2297,7 @@ void startSim(simData *simd, char *sim, char *type, int count, int window, int p } else { -// TODO - some compromise, do a premptive load check if we are not doing a wait anyway. +// TODO - some compromise, do a preemptive load check if we are not doing a wait anyway. } ourSims->doIt = ((count + 1) % bulkSims); } @@ -2342,9 +2342,9 @@ void stopSim(simData *simd, char *sim, char *type, int count, int window, int pa // There's three things that might happen - // Sim will quit, tmux pane will go away before we can see the shutdown message. // pane-exited hook might be useful here. - // Sim will quit, tmux pane wont go away. Dunno yet if waitTmuxText() will still work. + // Sim will quit, tmux pane won't go away. Dunno yet if waitTmuxText() will still work. // pane-died hook might be useful here. - // Sim fails to quit, error message on the pane that we want to read, wont see the shutdown message. + // Sim fails to quit, error message on the pane that we want to read, won't see the shutdown message. // Also sim might not have finished starting up, and may even not be accepting comands yet. // TODO - cater for and test them all. // Could also loop on checkSimIsRunning(sim) @@ -2391,8 +2391,8 @@ void gitar(simData *simd, char *sim, int count, int window, int panes, int pane, /* Work around OpenSims slow database corruption bug by using git to store all old backups. Try to squeeze every last byte out of the tarballs. Seems to cut the total storage size down to one third the size of just the raw I/OAR files. Saves even more if there's been no changes. - On the other hand, these backup files will grow indefinately, the more changes, the faster it grows. I can live with that for more reliable backups that go back further. - Tries to avoid loosing data if things go wrong. I think the main remaining problem would be running out of space, in which case you have bigger problems to deal with. + On the other hand, these backup files will grow indefinitely, the more changes, the faster it grows. I can live with that for more reliable backups that go back further. + Tries to avoid losing data if things go wrong. I think the main remaining problem would be running out of space, in which case you have bigger problems to deal with. Strategy - unpack the last one, unpack and commit any old I/OARs, pack up the result, delete it's working directory, THEN run the save i/oar. Avoids having to sync with OpenSim finishing the current I/OAR, and as a bonus, an easy to deliver latest I/OAR for people that want it. @@ -2455,7 +2455,7 @@ TODO - if (strcmp(fullName, sim) != 0) ungitar(simd, fullName, count, window, panes, pane, FLAG(m), member, last); ungitar(simd, sim, count, window, panes, pane, FLAG(m), member, last); - if (!qfile_mkdir(dir, S_IRWXU | S_IRGRP | S_IXGRP, true)) E("Faild to make directory %s!", dir); + if (!qfile_mkdir(dir, S_IRWXU | S_IRGRP | S_IXGRP, true)) E("Failed to make directory %s!", dir); if (shellMeFail("mv %s %s", gtr1, dir)) E("Failed to move %s!", gtr1); if (qfile_exist(gtr)) { @@ -2469,7 +2469,7 @@ TODO - { I("Found ancient gitar %s", gtr1); ungitar(simd, sim, count, window, panes, pane, FLAG(m), member, last); - if (!qfile_mkdir(dir, S_IRWXU | S_IRGRP | S_IXGRP, true)) E("Faild to make directory %s!", dir); + if (!qfile_mkdir(dir, S_IRWXU | S_IRGRP | S_IXGRP, true)) E("Failed to make directory %s!", dir); if (shellMeFail("mv %s %s", gtr1, dir)) E("Failed to move %s!", gtr1); if (qfile_exist(gtr)) { @@ -2482,7 +2482,7 @@ TODO - // Either unpack the old gitAR, or create a new one. if (!qfile_exist(dir)) { - if (!qfile_mkdir(dir, S_IRWXU | S_IRGRP | S_IXGRP, true)) E("Faild to make directory %s!", dir); + if (!qfile_mkdir(dir, S_IRWXU | S_IRGRP | S_IXGRP, true)) E("Failed to make directory %s!", dir); } if (qfile_exist(gtr)) { @@ -2511,8 +2511,8 @@ TODO - if (shellMeFail("cd %s/%s; git config user.email \"opensim@$(hostname -A | cut -d ' ' -f 1)\"", dir, gar)) E("Failed to git config user.email!"); if (shellMeFail("cd %s/%s; git config user.name \"opensim\"", dir, gar)) E("Failed to git config user.name!"); - // Coz git insists on having something comitted before it can change the branch name. - if (-1 == qfile_save(gab, gad, strlen(gad), false)) E("Faild to write %s file!", gad); + // Coz git insists on having something committed before it can change the branch name. + if (-1 == qfile_save(gab, gad, strlen(gad), false)) E("Failed to write %s file!", gad); if (shellMeFail("cd %s/%s; git add .gitattributes >>%s", dir, gar, gerr)) E("Failed to git add!"); V("Committing initial git."); if (shellMeFail("cd %s/%s; git commit -qm \"Initial commit\" >>%s || echo \"ERROR - Could not commit!\" >>%s", @@ -2520,7 +2520,7 @@ TODO - if (shellMeFail("cd %s/%s; git branch -m master Domme >>%s", dir, gar, gerr)) E("Failed to git branch -m master Domme!"); } // Doing these each time, to catch those old ones that didn't have them. - // Coz otherwise git commit starts a gc run IN THE BACKGROUD, which screws up trying to tarball it. + // Coz otherwise git commit starts a gc run IN THE BACKGROUND, which screws up trying to tarball it. if (shellMeFail("cd %s/%s; git config gc.autodetach false", dir, gar)) E("Failed to git config gc.autodetach!"); // Don't want it running in the foreground either, coz it dumps on the console, we do a gc --quiet later anyway. if (shellMeFail("cd %s/%s; git config gc.auto 0", dir, gar)) E("Failed to git config gc.auto!"); @@ -2580,7 +2580,7 @@ TODO - // The \\* bit is to escape the \ from snprintf, which itself escapes the * from the shell. if (shellMeFail("cd %s/%s; git add */\\* >>%s", dir, gar, gerr)) E("Failed to git add!"); // Gotta add this again, coz of the rm. Apparently rm removes dotfiles, but add doesn't! - if (-1 == qfile_save(gab, gad, strlen(gad), false)) E("Faild to write %s file!", gab); + if (-1 == qfile_save(gab, gad, strlen(gad), false)) E("Failed to write %s file!", gab); if (shellMeFail("cd %s/%s; git add .gitattributes >>%s", dir, gar, gerr)) E("Failed to git add!"); // Magic needed to figure out if there's anything to commit. @@ -2645,7 +2645,7 @@ gitARend: void ungitar(simData *simd, char *sim, int count, int window, int panes, int pane, int m, int member, char *last) { -/* Extact all the I/OAR files from a gitAR file. +/* Extract all the I/OAR files from a gitAR file. Gotta do it the hard way, OpenSim expects the "control file" to be first file in the archive. I guess that's archive.xml, which would normally end up last. @@ -3085,7 +3085,7 @@ void dbFreeFields(dbFields *flds, boolean all) { flds->count--; -// TODO - sigh, looks to be inconsistant why some do and some don't leak. +// TODO - sigh, looks to be inconsistent why some do and some don't leak. // I guess the ones that don't leak are the ones that crash? // It's only a tiny leak anyway, 80 bytes total. // if ((0 >= flds->count) || all) // CRASHY @@ -3525,7 +3525,7 @@ t("Database timeout test %lf > %lf", ((t - n) / 1000000000.0), (dbTimeout / 2.0) } if (0 == i) { - E("Statement prepare for INSERT must have in paramaters."); + E("Statement prepare for INSERT must have in parameters."); ret++; free(values); values = xmprintf(""); @@ -5262,10 +5262,10 @@ static void HTMLfooter(reqData *Rd) compare the level field to the linky type in the linky URL, new users -200 would be "../validateUser/.." and not "../resetPassword/.." . delete the linky token . Particularly important for the forgotten password email, since now that token is in the wild, and is used to reset a password. - Which begs the question, other than being able to recieve the email, how do we tell it's them? + Which begs the question, other than being able to receive the email, how do we tell it's them? Security questions suck, too easily guessed. Ask their DoB. Still sucky, coz "hey it's my birthday today" is way too leaky. - This is what Multi Factor Autentication is good for, and that's on the TODO list. + This is what Multi Factor Authentication is good for, and that's on the TODO list. Also, admins should have a harder time doing password resets. Must be approved by another admin? Must log onto the server via other means to twiddle something there? @@ -5504,10 +5504,10 @@ char *checkLinky(reqData *Rd) "You should add that email address to your contacts, or otherwise let it through your spam filter.   " "It will be from %s@%s, and it might be in your spam folder, coz these sorts of emails sometimes end up there.   " "You should add that email address to your contacts, or otherwise let it through your spam filter.   " - "If your email client wont let you click the validation link, just copy and paste it into your web browser.   " - "If your email client wont let you click the validation link, just copy and paste it into your web browser.   " - "If your email client wont let you click the validation link, just copy and paste it into your web browser.   " - "If your email client wont let you click the validation link, just copy and paste it into your web browser.   " + "If your email client won't let you click the validation link, just copy and paste it into your web browser.   " + "If your email client won't let you click the validation link, just copy and paste it into your web browser.   " + "If your email client won't let you click the validation link, just copy and paste it into your web browser.   " + "If your email client won't let you click the validation link, just copy and paste it into your web browser.   " // "%s" "

\n", "grid_no_reply", Rd->Host, @@ -5737,13 +5737,13 @@ t("Write shs %s", tnm4); "Please go to this web link to validate your new account -\n" "https://%s%s?hashish=%s\n" "THE FOLLOWING IS REPEATED, COZ PEOPLE JUST DON'T FOLLOW DIRECTIONS!\n" - "If your email client wont let you click the validation\n" + "If your email client won't let you click the validation\n" "link, just copy and paste it into your web browser.\n" - "If your email client wont let you click the validation\n" + "If your email client won't let you click the validation\n" "link, just copy and paste it into your web browser.\n" - "If your email client wont let you click the validation\n" + "If your email client won't let you click the validation\n" "link, just copy and paste it into your web browser.\n" - "If your email client wont let you click the validation\n" + "If your email client won't let you click the validation\n" "link, just copy and paste it into your web browser.\n" "\n" "\n" @@ -6452,7 +6452,7 @@ I("Validated session for %s.", shs->name); { V("Validated session linky."); addStrL(Rd->messages, "Congratulations, you have validated your new account. Now you can log onto the web site."); - addStrL(Rd->messages, "NOTE - you wont be able to log onto the grid until your new account has been approved."); + addStrL(Rd->messages, "NOTE - you won't be able to log onto the grid until your new account has been approved."); Rd->lnk = xzalloc(sizeof(sesh)); Rd->lnk->status = SHS_NUKE; qstrcpy(Rd->lnk->leaf, sizeof(Rd->lnk->leaf), leaf); @@ -6741,7 +6741,7 @@ static int emailValidate(reqData *Rd, inputForm *iF, inputValue *iV) char *t0 = qurl_encode(email, strlen(email)); // In theory it's the correct thing to do to NOT load email into stuff on failure, - // In practice, that means it wont show the old email and emayl in the create page when they don't match. + // In practice, that means it won't show the old email and emayl in the create page when they don't match. if ((0 == ret) || notSame) Rd->stuff->putstrf(Rd->stuff, "email", "%s", t0); free(t0); @@ -7971,7 +7971,7 @@ void sessionStateEngine(reqData *Rd, char *type) switch (Rd->shs.status) { case SHS_UNKNOWN: d("sessionStateEngine(SHS_UNKNOWN, %s)", type); break; - case SHS_NONE: d("sessionStateEngine(SHS_NONE, %s)", type); break; + case SHS_NONE: d("sessionStateEngine(SHS_NONE, %s)", type); break; case SHS_BOGUS: d("sessionStateEngine(SHS_BOGUS, %s)", type); break; case SHS_PROBLEM: d("sessionStateEngine(SHS_PROBLEM, %s)", type); break; case SHS_VALID: d("sessionStateEngine(SHS_VALID, %s)", type); break; @@ -8281,7 +8281,7 @@ void account_html(char *file, reqData *Rd, HTMLfile *thisFile) sessionStateEngine(Rd, "CANCELLED"); } - sessionStateEngine(Rd, "submited"); + sessionStateEngine(Rd, "submitted"); switch (Rd->shs.status) { case SHS_RENEW: @@ -8955,7 +8955,7 @@ Copy correct config/config.ini to there. // A bit chicken and egg here. // We need to be the correct user to set the correct perms on the scRun directory -// But we wont be the correct user until we run tmux as that user. +// But we won't be the correct user until we run tmux as that user. // The path to the web socket needs to be readable by the www-data group. So the FCGI socket will work. // AND it needs to be group sticky on opensimsc group. So the tmux socket will work. // Put both in scRun, and make it other readable? @@ -9543,7 +9543,7 @@ if ((strcmp("HTTP_COOKIE", ky) == 0) || (strcmp("CONTENT_LENGTH", ky) == 0) || ( free(k); } - // The FCGI paramaters sent from the server, are converted to environment variablse for the fcgi2 SDK. + // The FCGI parameters sent from the server, are converted to environment variables for the fcgi2 SDK. // The FCGI spec doesn't mention what these are. except FCGI_WEB_SERVER_ADDRS. char *Role = Rd->headers->getstr(Rd->headers, "FCGI_ROLE", false); Rd->Path = Rd->headers->getstr(Rd->headers, "PATH_INFO", false); @@ -9677,7 +9677,7 @@ t("BODY"); Rd->Rheaders->putstr(Rd->Rheaders, "Status", "200 OK"); Rd->Rheaders->putstr(Rd->Rheaders, "Content-type", "text/html"); // TODO - check these. - // This is all dynamic web pages, and likeley secure to. + // This is all dynamic web pages, and likely secure to. // Most of these are from https://www.smashingmagazine.com/2017/04/secure-web-app-http-headers/ // https://www.twilio.com/blog/a-http-headers-for-the-responsible-developer is good to, and includes useful compression and image stuff. // On the other hand, .css files are referenced, which might be better off being cached, so should tweak some of thees. @@ -9827,13 +9827,13 @@ sendReply: tmp0 = Rd->Rheaders->getstr(Rd->Rheaders, "Status", false); if (NULL == tmp0) { - E("Some sort of error happpened! Status: UNKNOWN!!"); - FCGI_printf("Some sort of error happpened! Status: UNKNOWN!!"); + E("Some sort of error happened! Status: UNKNOWN!!"); + FCGI_printf("Some sort of error happened! Status: UNKNOWN!!"); } else { - E("Some sort of error happpened! Status: %s", tmp0); - FCGI_printf("Some sort of error happpened! Status: %s", tmp0); + E("Some sort of error happened! Status: %s", tmp0); + FCGI_printf("Some sort of error happened! Status: %s", tmp0); } } else -- cgit v1.1