it successfully (or an error occurs in the client itself).
$Log$
+ Revision 614.14 2004/02/04 18:27:25 error
+ * Don't delete temp file when composing message until after server writes
+ it successfully (or an error occurs in the client itself).
+
Revision 614.13 2004/02/04 04:07:56 ajc
* More work on LDAP connector
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
/* Reopen the temp file that was created, so we can send it */
fp = fopen(temp, "r");
- /* Yes, unlink it now, so it doesn't stick around if we crash */
- unlink(temp);
-
if (!fp || !(message.text = load_message_from_file(fp))) {
err_printf("*** Internal error while trying to save message!\n"
"%s: %s\n",
temp, strerror(errno));
+ unlink(temp);
return(errno);
}
return (1);
}
+ /* Yes, unlink it now, so it doesn't stick around if we crash */
+ unlink(temp);
+
if (num_msgs >= 1) highmsg = msgarr[num_msgs - 1];
if (msgarr) free(msgarr);