[svn-commits] russell: trunk r99922 - /trunk/main/tcptls.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jan 23 11:35:54 CST 2008


Author: russell
Date: Wed Jan 23 11:35:54 2008
New Revision: 99922

URL: http://svn.digium.com/view/asterisk?view=rev&rev=99922
Log:
Fix tcptls build when openssl isn't installed

(closes issue #11813)
Reported by: tzafrir
Patches:
      asterisk-tcptls.diff.txt uploaded by jamesgolovich (license 176)

Modified:
    trunk/main/tcptls.c

Change Statistics:
 0 files changed

Modified: trunk/main/tcptls.c
URL: http://svn.digium.com/view/asterisk/trunk/main/tcptls.c?view=diff&rev=99922&r1=99921&r2=99922
==============================================================================
--- trunk/main/tcptls.c (original)
+++ trunk/main/tcptls.c Wed Jan 23 11:35:54 2008
@@ -83,22 +83,20 @@
 
 HOOK_T server_read(struct server_instance *ser, void *buf, size_t count)
 {
-	if (!ser->ssl) 
-		return read(ser->fd, buf, count);
 #ifdef DO_SSL
-	else
+	if (ser->ssl)
 		return ssl_read(ser->ssl, buf, count);
 #endif
+	return read(ser->fd, buf, count);
 }
 
 HOOK_T server_write(struct server_instance *ser, void *buf, size_t count)
 {
-	if (!ser->ssl) 
-		return write(ser->fd, buf, count);
 #ifdef DO_SSL
-	else
+	if (ser->ssl)
 		return ssl_write(ser->ssl, buf, count);
 #endif
+	return write(ser->fd, buf, count);
 }
 
 void *server_root(void *data)
@@ -356,9 +354,11 @@
 void *ast_make_file_from_fd(void *data)
 {
 	struct server_instance *ser = data;
+#ifdef DO_SSL
 	int (*ssl_setup)(SSL *) = (ser->client) ? SSL_connect : SSL_accept;
 	int ret;
 	char err[256];
+#endif
 
 	/*
 	* open a FILE * as appropriate.




More information about the svn-commits mailing list