Art Cancro [Mon, 29 Jan 2024 18:58:08 +0000 (13:58 -0500)]
binaries.txt: converted to markdown
Art Cancro [Mon, 29 Jan 2024 16:09:52 +0000 (11:09 -0500)]
Codified plans for world domination
Art Cancro [Mon, 29 Jan 2024 03:23:03 +0000 (22:23 -0500)]
Changed the BIGMSGS semantics.
We now identify the memory location of the start of message body
during serialization, so we don't have to measure it twice. Then
we store the body in the BIGMSGS table only if the total message
size would exceed 4000 bytes. This assumes that memory and disk
pages are 4096 bytes, so we want to optimize for a single I/O
operation in most cases.
Art Cancro [Sat, 27 Jan 2024 17:27:57 +0000 (12:27 -0500)]
loadtest: default threads now 10
Art Cancro [Sat, 27 Jan 2024 00:09:34 +0000 (19:09 -0500)]
loadtest: added ops/sec meter
Art Cancro [Fri, 26 Jan 2024 21:51:39 +0000 (16:51 -0500)]
Assert that eMessageText MUST be serialized last.
Also assert that the calculated length of the serialized message
is actually the final length. Either of these conditions not
being true is worth crashing the server so the developer who broke
it knows immediately.
Art Cancro [Fri, 26 Jan 2024 18:14:02 +0000 (13:14 -0500)]
CtdlSerializeMessage() now returns struct smr_ret
Instead of giving it a pointer to a struct to fill, now it just
returns a struct. Because it is the current year and the compiler
can handle that.
Art Cancro [Thu, 25 Jan 2024 16:37:39 +0000 (11:37 -0500)]
Rearranging code to prepare for multiple REPORT types
Art Cancro [Thu, 25 Jan 2024 00:26:14 +0000 (19:26 -0500)]
remove leading/trailing whitespace from hrefs
This was found in the CALDAV 'calendar-multiget' REPORT and has been fixed
Art Cancro [Wed, 24 Jan 2024 22:19:23 +0000 (17:19 -0500)]
Noodling on calendar query commands.
The server command 'ICAL report' is now 'ICAL query' with the intent that
it will handle CalDAV 'calendar-query' REPORTs, but not other REPORTs.
Likewise, functions with names including the string 'calendar_report' have
been changed to 'calendar_query'.
Art Cancro [Wed, 24 Jan 2024 21:32:07 +0000 (16:32 -0500)]
Made our cproto output even more beautiful
Art Cancro [Wed, 24 Jan 2024 20:19:57 +0000 (10:19 -1000)]
Began refactoring CALDAV REPORT flow of control.
Removed calendar_functions.c and brought some of its code over
to caldav_reports.c so that we can use the same code path for all
three types of REPORTs.
This is motivated by an idea that perhaps the user interface can
use CalDAV as its REST API instead of inventing something new. If
that doesn't work, we needed to finish CalDAV eventually anyway.
Art Cancro [Wed, 24 Jan 2024 01:22:33 +0000 (15:22 -1000)]
Don't bother reading this commit.
Art Cancro [Tue, 23 Jan 2024 16:18:41 +0000 (11:18 -0500)]
Blockquotes are now rendered to console as dim instead of italic
Art Cancro [Sat, 20 Jan 2024 16:01:04 +0000 (11:01 -0500)]
New config option: set smtp_advertise_starttls to nonzero to advertise STARTTLS in ESMTP
Art Cancro [Sun, 14 Jan 2024 03:04:16 +0000 (22:04 -0500)]
updated description
Art Cancro [Wed, 10 Jan 2024 22:20:09 +0000 (17:20 -0500)]
move calendar prototypes around, add more with cproto
Art Cancro [Mon, 8 Jan 2024 21:29:16 +0000 (16:29 -0500)]
Experimenting with the code layout for calendar report handling.
The goal is to provide calendar searches (date range etc) for both WebCit-NG
and for CALDAV REPORT method in a DRY way.
Art Cancro [Mon, 8 Jan 2024 16:57:28 +0000 (11:57 -0500)]
Don't log each table open/close, just the whole operation
Art Cancro [Mon, 8 Jan 2024 15:19:58 +0000 (10:19 -0500)]
START_CHAT_MODE is renamed to SEND_THEN_RECV
This protocol mode began almost 30 years ago when we handled real time chat by
holding a session open and moving data back and forth until told to stop. We
don't do that anymore, but there are several places where a command requires
sending long data in both directions. SEND_THEN_RECV is a better name for this.
Art Cancro [Sat, 6 Jan 2024 00:01:38 +0000 (19:01 -0500)]
The damn thing finished. Let's see what it did.
Art Cancro [Fri, 5 Jan 2024 23:56:50 +0000 (18:56 -0500)]
Still waiting for the computer. Or rather, for other computers.
Art Cancro [Fri, 5 Jan 2024 23:51:03 +0000 (18:51 -0500)]
Still waiting...
Art Cancro [Fri, 5 Jan 2024 23:47:56 +0000 (18:47 -0500)]
This time I'm waiting for the computer.
Art Cancro [Fri, 5 Jan 2024 20:49:15 +0000 (15:49 -0500)]
Can you tell I'm REALLY avoiding another task right now?
Art Cancro [Fri, 5 Jan 2024 20:22:18 +0000 (15:22 -0500)]
The little LEDs on the NanoPi blink when there is activity.
It's fun to watch. It's fun to build on ARM first and try x86 later.
Art Cancro [Fri, 5 Jan 2024 19:52:10 +0000 (14:52 -0500)]
That about wraps it up for serv_calendar.c
Seeing this code has really brought me back to the upstairs room
in my old house where I wrote most of it back in 2002-2003. I can
see the sunlight coming in the windows, the color of the carpet,
the little alcove where the computer was, the cat sleeping on top
of the big CRT monitor.
Hopefully the stuff I need to add to it now will be straightforward
since it looks like I really took my time and commented it heavily.
It looks pretty clean, especially now that I've reformatted it with
the new screen width an C99 comments. It does seem a bit WET though.
Art Cancro [Fri, 5 Jan 2024 19:44:46 +0000 (14:44 -0500)]
Continuing the war against C89-style comments
Art Cancro [Fri, 5 Jan 2024 15:33:17 +0000 (10:33 -0500)]
serv_calendar.c: more formatting changes
Art Cancro [Thu, 4 Jan 2024 22:51:08 +0000 (17:51 -0500)]
dammit, learn to spell
Many years ago, someone inserted an enum called eMesageText into the code
and used it all over the place without correcting the spelling. This
commit finally fixes it.
Art Cancro [Thu, 4 Jan 2024 22:47:35 +0000 (17:47 -0500)]
serv_calendar.c: basically reformatting for modern standards
When I wrote this stuff I had a 109 column screen. Now our standard
is 132 columns. Also we are seeking and destroying any place where
spaces were used as indentation. Our code is indented with tabs, the
way God intended.
Art Cancro [Thu, 4 Jan 2024 22:44:14 +0000 (17:44 -0500)]
serv_calendar.c: basically reformatting for modern standards
When I wrote this stuff I had a 109 column screen. Now our standard
is 132 columns. Also we are seeking and destroying any place where
spaces were used as indentation. Our code is indented with tabs, the
way God intended.
Art Cancro [Thu, 4 Jan 2024 16:32:31 +0000 (11:32 -0500)]
End support for libical <2.0
Art Cancro [Thu, 4 Jan 2024 15:54:40 +0000 (10:54 -0500)]
Wondering how we ever got by with narrow terminals
Art Cancro [Wed, 3 Jan 2024 18:58:45 +0000 (13:58 -0500)]
clarify terms in license
Art Cancro [Wed, 3 Jan 2024 18:41:16 +0000 (13:41 -0500)]
dumploadtest.sh: added an exit 0 to the top of the script.
This is a testing script intended for developers. The last thing
we need is for some dumbass to run it without knowing what it does,
and then come to us complaining that it deleted their database.
Art Cancro [Wed, 3 Jan 2024 18:34:06 +0000 (13:34 -0500)]
In case you haven't figured it out yet...
This is what I do when I'm avoiding some other task.
Art Cancro [Wed, 3 Jan 2024 18:15:24 +0000 (13:15 -0500)]
Grammar change in the license declaration.
Many of the files say "use, duplication, or disclosure ARE subject
to..." but the common phrasing of this statement is apparently "use,
duplication, or disclosure IS subject to..."
We are already taking great delight in the fact that we are using the
GPL without using Stallman's preferred declaration of it. And of course
we call it open source software.
When Steve Jobs died, Richard Stallman said "I'm not glad he's dead,
but I'm glad he's gone." I agreed with him. When Richard Stallman dies,
I will say "I'm not glad he's dead, but I'm glad he's gone." But
when Bill Gates dies, I will be glad he's dead. I will celebrate.
Art Cancro [Wed, 3 Jan 2024 18:12:25 +0000 (13:12 -0500)]
style cleanup
Art Cancro [Wed, 3 Jan 2024 17:01:44 +0000 (12:01 -0500)]
More C99-style comments.
Art Cancro [Tue, 2 Jan 2024 22:00:38 +0000 (17:00 -0500)]
The sooner we can put webcit-classic out to pasture the better.
Between its origin as a shitty web application that I built when I had
no idea what the hell I was doing, to all of the ways other people fucked
it up later, this thing needs to die. As soon as possible.
Art Cancro [Tue, 2 Jan 2024 21:57:06 +0000 (16:57 -0500)]
serv_func.c: simplify IDEN command
Remove parameters no longer used
Art Cancro [Tue, 2 Jan 2024 21:38:07 +0000 (16:38 -0500)]
Utilities displaying a color banner now use line drawing characters to form a box instead of clearing to the end of the line with the background color. The latter does not have the desired effect on all terminals.
Art Cancro [Tue, 2 Jan 2024 18:42:38 +0000 (13:42 -0500)]
context.c: last_purge is local to dead_session_purge()
Art Cancro [Tue, 2 Jan 2024 18:21:39 +0000 (13:21 -0500)]
Changes to server session timeouts.
CLIENT_TIMEOUT was found in the header files but not used anywhere. Removed.
dont_term was removed because it was not needed anywhere anymore.
Art Cancro [Tue, 2 Jan 2024 18:10:18 +0000 (13:10 -0500)]
It is the current year. (c)-2024
Art Cancro [Tue, 2 Jan 2024 18:07:33 +0000 (13:07 -0500)]
Remove sock_close and sock_shutdown 'portability' defs.
Art Cancro [Sun, 31 Dec 2023 23:30:07 +0000 (18:30 -0500)]
Removed the dev_code, cli_code, and rev_level fields from the server session.
Art Cancro [Sun, 31 Dec 2023 23:12:54 +0000 (18:12 -0500)]
serv_session.c: style update
Art Cancro [Wed, 27 Dec 2023 23:45:03 +0000 (18:45 -0500)]
Starting to bring over calendar server code from webcit-classic.
Art Cancro [Wed, 27 Dec 2023 19:48:52 +0000 (14:48 -0500)]
view_calendar.js: finalized a fetch design pattern
This uses "fetch" followed by ".then" etc. etc. etc.
and is tuned to be a design pattern for future code
Art Cancro [Wed, 27 Dec 2023 18:53:52 +0000 (13:53 -0500)]
calendar_view.c (from webcit-classic) : clean up
Style and comments cleanup. Some of this code is going to get
copied over to WebCit-NG so we need to bring it up to our current
coding standards (K&R, 1TBF, with C99-style comments)
Art Cancro [Fri, 22 Dec 2023 23:58:46 +0000 (18:58 -0500)]
Worked out the syntax for requesting a calendar range
Art Cancro [Fri, 22 Dec 2023 16:54:16 +0000 (11:54 -0500)]
moar skeleton
Art Cancro [Fri, 22 Dec 2023 16:39:42 +0000 (11:39 -0500)]
webcit.h: regenerated function prototypes using cproto
Art Cancro [Fri, 22 Dec 2023 16:24:19 +0000 (11:24 -0500)]
calendar_functions.c: added skeleton
Art Cancro [Fri, 22 Dec 2023 16:10:14 +0000 (11:10 -0500)]
room_functions.c: get_msglist() now returns Array
Previously it returned a long* which contained a list of longs.
Assembling this required the same allocation logic used in our
array class, so now we're just using the array class.
Art Cancro [Fri, 22 Dec 2023 15:52:57 +0000 (10:52 -0500)]
Changed the arrangement of bytes in the universe
Art Cancro [Thu, 21 Dec 2023 21:27:31 +0000 (16:27 -0500)]
Updated copyright date in files where git blame shows 2023 mods
Art Cancro [Wed, 20 Dec 2023 17:13:03 +0000 (12:13 -0500)]
Added stub renderers for Calendar and Contacts rooms
Art Cancro [Wed, 20 Dec 2023 16:51:12 +0000 (11:51 -0500)]
views.js: convert strings to template literals
Art Cancro [Wed, 20 Dec 2023 15:50:53 +0000 (10:50 -0500)]
Found a place where 1TBS was not used, and fixed it.
1TBS is important. People who do not use 1TBS are literally Hitler.
Art Cancro [Wed, 20 Dec 2023 04:15:10 +0000 (23:15 -0500)]
More template literals.
Art Cancro [Wed, 20 Dec 2023 04:12:38 +0000 (23:12 -0500)]
I really like template literals.
And now that I know how to use them, I will be using more of them.
Art Cancro [Wed, 20 Dec 2023 04:07:00 +0000 (23:07 -0500)]
Tuned up the CSS on more banner buttons
Art Cancro [Tue, 19 Dec 2023 22:09:21 +0000 (17:09 -0500)]
Make the font sizes less cartoonish at extreme viewport sizes
Art Cancro [Mon, 18 Dec 2023 19:26:30 +0000 (14:26 -0500)]
When forwarding an email, pre-load its attachments.
This completes the effort to server-side-preload the attachments from
the original message. They appear as attachments in the forwarded copy
of the message in the composer, using the same API. A lot of effort
went into making the 'attach' and 'forward attachments' functions DRY
with respect to each other.
Art Cancro [Mon, 18 Dec 2023 04:39:00 +0000 (23:39 -0500)]
serv_smtpclient.c: style cleanup
Mostly just made stuff look nice in 132 columns
Art Cancro [Thu, 14 Dec 2023 16:30:52 +0000 (11:30 -0500)]
upload.c: completed the code to reload attachments.
Now we have an API call to load attachments from existing messages
instead of from the browser. This is the server side API. Still need
to integrate it into the client.
Art Cancro [Thu, 14 Dec 2023 15:29:02 +0000 (10:29 -0500)]
view_mail.js: don't list attachments in a quote or forward
Art Cancro [Wed, 13 Dec 2023 22:52:18 +0000 (17:52 -0500)]
upload.c: skeleton code for load_attachments_from_message()
Art Cancro [Wed, 13 Dec 2023 22:25:43 +0000 (17:25 -0500)]
uploads.c: made the syslog less verbose
Also documented the JSON return values in api.txt
Art Cancro [Wed, 13 Dec 2023 03:15:17 +0000 (22:15 -0500)]
view_mail.js: more improvements to mail forwarding
* "Fwd:" instead of "Re:"
* The "--- forwarded message ---" po string is carried over from webcit-classic
* Make the editor aware that a message is being forwarded
* TODO: load attachments from the message being forwarded
Art Cancro [Wed, 13 Dec 2023 02:21:19 +0000 (21:21 -0500)]
Keep the "Attachments:" button updated.
When an attachment is added or removed using the upload window,
also update the count in the button.
Art Cancro [Wed, 13 Dec 2023 02:10:57 +0000 (21:10 -0500)]
"Number of attachments" div name is now variable.
Actually it's an array of strings, and the upload module will
update every div stored in there with the attachment count.
Art Cancro [Thu, 7 Dec 2023 23:51:32 +0000 (18:51 -0500)]
view_mail.js: remove upload from local array when deleted.
This makes the Attachments: counter decrement correctly.
Art Cancro [Thu, 7 Dec 2023 20:29:18 +0000 (15:29 -0500)]
view_mail.js: removed the is_quoted parameter.
is_quoted is now determined by whether quoted_msgnum is nonzero.
In mail, we always pull quote for replies.
Art Cancro [Wed, 6 Dec 2023 21:20:40 +0000 (16:20 -0500)]
view_mail.js: fixed handling of references field
Art Cancro [Thu, 30 Nov 2023 19:07:12 +0000 (09:07 -1000)]
Converting recipient arrays to recipient strings:
Fixed the dedupe so it works before now, and
also made it DRY.
Art Cancro [Thu, 30 Nov 2023 18:20:09 +0000 (08:20 -1000)]
databaselayout.md: updated to remove networking
Art Cancro [Wed, 29 Nov 2023 21:32:02 +0000 (11:32 -1000)]
Fixing the parameters sent to the mail composer.
Reply/ReplyAll/Forward need some things that are not strings
and the source arrays seem to still be in scope, so we go with
that. Need to tune this up some more. Some things are still
missing, such as the references and reply msgnum.
Art Cancro [Wed, 29 Nov 2023 04:52:36 +0000 (18:52 -1000)]
view_mail.js: make the Forward button appear.
Needs a lot of work. Currently it is just a reply with no addressees filled in.
It needs to not quote the message, and carry over the attachments.
Art Cancro [Wed, 29 Nov 2023 04:31:41 +0000 (18:31 -1000)]
"make cc/bcc visible" now makes BOTH visible.
Somewhere along the line it lost CC and only showed BCC.
Art Cancro [Mon, 27 Nov 2023 21:43:38 +0000 (11:43 -1000)]
serv_extensions.c: style cleanup from 30,000 feet
No, I'm not takin a broader view of the code. I'm actually on an airplane.
Art Cancro [Tue, 21 Nov 2023 23:26:46 +0000 (18:26 -0500)]
Focus on "To:" for new messages, body for replies.
Art Cancro [Tue, 21 Nov 2023 23:22:57 +0000 (18:22 -0500)]
mail view: focus the cursor in the correct place when composing
Art Cancro [Tue, 21 Nov 2023 22:55:03 +0000 (17:55 -0500)]
Restored the gap before the "Hi From Stu" sound.
Now I see why he put it there in the first place.
Some players (including the one in my browser) cut off
the first bit of sound.
Art Cancro [Tue, 21 Nov 2023 22:52:41 +0000 (17:52 -0500)]
Only attempt to insert quote when replying to mail.
Also do that after rendering the attachments window.
Doing it before doesn't work.
I don't know why.
Art Cancro [Tue, 21 Nov 2023 14:41:18 +0000 (09:41 -0500)]
Removed temporary diagnostic output
Art Cancro [Tue, 21 Nov 2023 00:00:13 +0000 (19:00 -0500)]
upload.js: when removing an attachment, delete the div
This is handled the usual way, when we get a successful response from
the HTTP DELETE method, it triggers the removal of the list element
showing the attachment.
Art Cancro [Sun, 19 Nov 2023 18:39:12 +0000 (13:39 -0500)]
When a mail compose is canceled, flush all uploads.
Most of this was already in place. We now just run through our upload
list and do an async DELETE operation for each one.
Art Cancro [Thu, 9 Nov 2023 23:44:52 +0000 (13:44 -1000)]
upload.js: moved the delete-an-attachment skeleton code to its own function
Art Cancro [Mon, 6 Nov 2023 22:57:44 +0000 (17:57 -0500)]
Fixed the MIME boundary after the message text.
It had the trailing dashes in it, so it was getting interpreted as the end of the message.
Now that's corrected and the parsers of the world are happy.
Also, we eliminated the double-nesting thing, and everything is hunky dory now.
Art Cancro [Mon, 6 Nov 2023 22:51:13 +0000 (17:51 -0500)]
Quoted-printable encode HTML messages on the WebCit Server side.
This allows us to do multipart with attachments without nested encoding.
Art Cancro [Mon, 6 Nov 2023 21:56:55 +0000 (16:56 -0500)]
webcit-ng: fixed the way HTTP uploads are fed into the MIME Parser.
mime_parser() expects HEADERS+CONTENT but our h.request_body only contains CONTENT.
The fix: our transaction struct now has h.request_body_with_synth_headers that
begins with a synthetic Content-Type: header followed by a blank line and then the
request body. h.request_body is now just a pointer into that buffer, starting at
the position where the actual body begins.
This gives us the ability to supply the body with or without headers, without having
to make two copies of it.
Art Cancro [Mon, 6 Nov 2023 16:57:37 +0000 (11:57 -0500)]
considering nuclear weapons
Art Cancro [Mon, 6 Nov 2023 16:48:36 +0000 (11:48 -0500)]
Looks like I need to remove some optimization cancer from mime_parser.c, but first, a bit of style cleanup.
Art Cancro [Mon, 6 Nov 2023 16:30:08 +0000 (11:30 -0500)]
Progress on upload
Art Cancro [Fri, 3 Nov 2023 20:34:07 +0000 (16:34 -0400)]
room_functions.c: remove diagnostic hex dump of recipient field
Art Cancro [Fri, 3 Nov 2023 04:13:46 +0000 (19:13 -0900)]
json.c: encode JSON strings the correct way (RFC 7159 section 7).
The previous code used the JavaScript encoder from the stringbuf library, which
is *not* the same encoding. Now it doesn't make the browser's parser barf when
it encounters a control character.