[evolution-data-server/camel-socks-proxy-master: 2/10] Change CamelHttpStream to use the new API



commit f8660b7035a496e230e3755c19d4c8e1f2ad1898
Author: Federico Mena Quintero <federico novell com>
Date:   Fri Jul 9 17:39:51 2010 -0500

    Change CamelHttpStream to use the new API
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 camel/camel-http-stream.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/camel/camel-http-stream.c b/camel/camel-http-stream.c
index efa0486..76531ff 100644
--- a/camel/camel-http-stream.c
+++ b/camel/camel-http-stream.c
@@ -60,7 +60,6 @@ http_connect (CamelHttpStream *http,
 {
 	CamelTcpStream *tcp_stream;
 	CamelStream *stream = NULL;
-	struct addrinfo *ai, hints = { 0 };
 	gint errsave;
 	gchar *serv;
 
@@ -89,26 +88,16 @@ http_connect (CamelHttpStream *http,
 	} else {
 		serv = url->protocol;
 	}
-	hints.ai_socktype = SOCK_STREAM;
-
-	ai = camel_getaddrinfo(url->host, serv, &hints, error);
-	if (ai == NULL) {
-		g_object_unref (stream);
-		return NULL;
-	}
 
 	tcp_stream = CAMEL_TCP_STREAM (stream);
 
-	if (camel_tcp_stream_connect (tcp_stream, ai, error) == -1) {
+	if (camel_tcp_stream_connect (tcp_stream, url->host, serv, 0, error) == -1) {
 		errsave = errno;
 		g_object_unref (stream);
-		camel_freeaddrinfo(ai);
 		errno = errsave;
 		return NULL;
 	}
 
-	camel_freeaddrinfo(ai);
-
 	http->raw = stream;
 	http->read = camel_stream_buffer_new (stream, CAMEL_STREAM_BUFFER_READ);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]