Re: [PATCH] flush data before destroy ssl connection
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | Centrium GmbH |
| Message-ID | <[email protected]> |
oops, I forgot to attach the patch ;) On Sunday 23 November 2003 20:40, Alexander Malysh wrote: > Hi List, > > attached you can find trivial patch that try to flush any remaining data > (also for ssl enabled connection) before destroying the connection. > There was a comment (guess from Stipe) that flushing data on ssl enabled > connection crashes the bearerbox on cygwin. Unfortunately, I can't > undestand why it should crash on cygwin??? Stipe would you please test > attached patch and confirm that it works for cygwin? > > Thanks... -- Best regards / Mit besten Grüßen aus Düsseldorf Dipl.-Ing. Alexander Malysh ___________________________________________ Centrium GmbH Vogelsanger Weg 80 40470 Düsseldorf Fon: +49 (0211) 74 84 51 80 Fax: +49 (0211) 277 49 109 email: a.malysh at centrium.de web: www.centrium.de msn: olek2002 at hotmail.com icq: 98063111 ___________________________________________ Please avoid sending me Word, Excel or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html
conn.c-flush-before-destroy.patch
(text/x-diff, 992 B)
Index: gwlib/conn.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/conn.c,v
retrieving revision 1.67
diff -a -u -r1.67 conn.c
--- gwlib/conn.c 15 Nov 2003 13:14:23 -0000 1.67
+++ gwlib/conn.c 23 Nov 2003 19:26:22 -0000
@@ -748,10 +748,9 @@
fdset_unregister(conn->registered, conn->fd);
if (conn->fd >= 0) {
- /* Try to flush any remaining data, only in case this is
- * not a SSL connection. Otherwise this crashes the bearerbox
- * at least on the Cygwin platform
- */
+ /* Try to flush any remaining data */
+ unlocked_write(conn);
+
#ifdef HAVE_LIBSSL
if (conn->ssl != NULL) {
mutex_lock(conn->ssl_mutex);
@@ -762,9 +761,7 @@
mutex_unlock(conn->ssl_mutex);
mutex_destroy(conn->ssl_mutex);
}
- else
#endif /* HAVE_LIBSSL */
- unlocked_write(conn);
ret = close(conn->fd);
if (ret < 0)
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/wQ54nX3e5W+uJ0ERAj1NAJ4u+ZStGoAWsXOuHopMEVmLgDBahQCeNY+d 5wRXATu35P0LhgSD4LIY9jg= =03K+ -----END PGP SIGNATURE-----