[asterisk-commits] seanbright: branch group/asterisk-cpp r168400 - /team/group/asterisk-cpp/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 10 18:16:09 CST 2009


Author: seanbright
Date: Sat Jan 10 18:16:08 2009
New Revision: 168400

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168400
Log:
tcptls.c compiles

Modified:
    team/group/asterisk-cpp/main/tcptls.c

Modified: team/group/asterisk-cpp/main/tcptls.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/tcptls.c?view=diff&rev=168400&r1=168399&r2=168400
==============================================================================
--- team/group/asterisk-cpp/main/tcptls.c (original)
+++ team/group/asterisk-cpp/main/tcptls.c Sat Jan 10 18:16:08 2009
@@ -53,7 +53,7 @@
 #ifdef DO_SSL
 static HOOK_T ssl_read(void *cookie, char *buf, LEN_T len)
 {
-	int i = SSL_read(cookie, buf, len-1);
+	int i = SSL_read((SSL *) cookie, buf, len-1);
 #if 0
 	if (i >= 0)
 		buf[i] = '\0';
@@ -70,14 +70,14 @@
 	s[len] = '\0';
 	ast_verb(0, "ssl write size %d <%s>\n", (int)len, s);
 #endif
-	return SSL_write(cookie, buf, len);
+	return SSL_write((SSL *) cookie, buf, len);
 }
 
 static int ssl_close(void *cookie)
 {
-	close(SSL_get_fd(cookie));
-	SSL_shutdown(cookie);
-	SSL_free(cookie);
+	close(SSL_get_fd((const SSL *) cookie));
+	SSL_shutdown((SSL *) cookie);
+	SSL_free((SSL *) cookie);
 	return 0;
 }
 #endif	/* DO_SSL */
@@ -92,7 +92,7 @@
 
 #ifdef DO_SSL
 	if (tcptls_session->ssl)
-		return ssl_read(tcptls_session->ssl, buf, count);
+		return ssl_read(tcptls_session->ssl, (char *) buf, count);
 #endif
 	return read(tcptls_session->fd, buf, count);
 }
@@ -107,14 +107,14 @@
 
 #ifdef DO_SSL
 	if (tcptls_session->ssl)
-		return ssl_write(tcptls_session->ssl, buf, count);
+		return ssl_write(tcptls_session->ssl, (const char *) buf, count);
 #endif
 	return write(tcptls_session->fd, buf, count);
 }
 
 static void session_instance_destructor(void *obj)
 {
-	struct ast_tcptls_session_instance *i = obj;
+	struct ast_tcptls_session_instance *i = (struct ast_tcptls_session_instance *) obj;
 	ast_mutex_destroy(&i->lock);
 }
 
@@ -125,7 +125,7 @@
 */
 static void *handle_tls_connection(void *data)
 {
-	struct ast_tcptls_session_instance *tcptls_session = data;
+	struct ast_tcptls_session_instance *tcptls_session = (struct ast_tcptls_session_instance *) data;
 #ifdef DO_SSL
 	int (*ssl_setup)(SSL *) = (tcptls_session->client) ? SSL_connect : SSL_accept;
 	int ret;
@@ -221,7 +221,7 @@
 
 void *ast_tcptls_server_root(void *data)
 {
-	struct ast_tcptls_session_args *desc = data;
+	struct ast_tcptls_session_args *desc = (struct ast_tcptls_session_args *) data;
 	int fd;
 	struct sockaddr_in sin;
 	socklen_t sinlen;
@@ -243,7 +243,7 @@
 				ast_log(LOG_WARNING, "Accept failed: %s\n", strerror(errno));
 			continue;
 		}
-		tcptls_session = ao2_alloc(sizeof(*tcptls_session), session_instance_destructor);
+		tcptls_session = (struct ast_tcptls_session_instance *) ao2_alloc(sizeof(*tcptls_session), session_instance_destructor);
 		if (!tcptls_session) {
 			ast_log(LOG_WARNING, "No memory for new session: %s\n", strerror(errno));
 			close(fd);
@@ -372,7 +372,7 @@
 		goto error;
 	}
 
-	if (!(tcptls_session = ao2_alloc(sizeof(*tcptls_session), session_instance_destructor)))
+	if (!(tcptls_session = (struct ast_tcptls_session_instance *) ao2_alloc(sizeof(*tcptls_session), session_instance_destructor)))
 		goto error;
 
 	ast_mutex_init(&tcptls_session->lock);




More information about the asterisk-commits mailing list