Brief summary: Modifies on_check_mail_menu_activate()
This describes modifications to the function
on_check_mail_menu_activate(). It fixes a crash that
happens if we
have already failed to read a folder list from the
**We never checked whether the_server->get_Folder()
(If we fail to read the folder list from the server,
call won't succeed, and havoc will result -- I should
happened to me!).
**gAlthea.get_Current_Server() was being called after
already initialized the variable the_server with its
contents. This in turn deceived the programmer into
writing some redundant code to handle the pointer
Ťthe_serverť being NULL. This redundant code was never
executed, since that check had already been performed.
**We called the_server->get_Folder() before we had a
When there is no server available (because none has
been set up yet),
on_check_mail_menu_activate will now give the better
"Go to Althea ==> Setup... and define a server."
instead of the confusing:
"Select a server first."
*Problems not corrected (yet?):
**The server reservation (6 lines) is code repeated in
a number of places;
should be consolidated into a method of the Server
**There's a synchronization problem with the server
Only way to fix this is to go over to using a proper
Posix 1003.1c mutex.
**Other places need checks for whether a current server
I made on_expunge_menu_activate() dump core.
A couple of other functions do use assertions to
confirm that there's
a current server. A step in the right direction, but
obviously a user
action should never trigger an assertion.
It would be good to have this code modularized and put
it there. The
right thing to do is have an
**When <Print> is clicked, check for whether there's a
before popping up the dialogue box, not after.