SF.net SVN: mahogany:[7537] trunk/M/lib/imap/src/c-client/smtp.c

[email protected] Thu, 07 Aug 2008 22:25:11 +0000
Newsgroups gmane.mail.mahogany.cvs
Message-ID <[email protected]>
Revision: 7537
          http://mahogany.svn.sourceforge.net/mahogany/?rev=7537&view=rev
Author:   vadz
Date:     2008-08-07 22:25:09 +0000 (Thu, 07 Aug 2008)

Log Message:
-----------
check for connection loss during smtp_send("QUIT") in smtp_close()

Modified Paths:
--------------
    trunk/M/lib/imap/src/c-client/smtp.c

Modified: trunk/M/lib/imap/src/c-client/smtp.c
===================================================================
--- trunk/M/lib/imap/src/c-client/smtp.c	2008-08-07 21:33:24 UTC (rev 7536)
+++ trunk/M/lib/imap/src/c-client/smtp.c	2008-08-07 22:25:09 UTC (rev 7537)
@@ -396,7 +396,8 @@
   if (stream) {			/* send "QUIT" */
     if (stream->netstream) {	/* do close actions if have netstream */
       smtp_send (stream,"QUIT",NIL);
-      net_close (stream->netstream);
+      if (stream->netstream)	/* could have been closed during "QUIT" */
+        net_close (stream->netstream);
     }
 				/* clean up */
     if (stream->host) fs_give ((void **) &stream->host);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/