[evolution-data-server/camel-socks-proxy: 92/94] Change CamelHttpStream to use the new API



commit c81975b23c8d63b86fe2ce110923b885182e8380
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 cbab535..40a5dc7 100644
--- a/camel/camel-http-stream.c
+++ b/camel/camel-http-stream.c
@@ -173,7 +173,6 @@ static CamelStream *
 http_connect (CamelHttpStream *http, CamelURL *url)
 {
 	CamelStream *stream = NULL;
-	struct addrinfo *ai, hints = { 0 };
 	gint errsave;
 	gchar *serv;
 
@@ -198,24 +197,14 @@ http_connect (CamelHttpStream *http, CamelURL *url)
 	} else {
 		serv = url->protocol;
 	}
-	hints.ai_socktype = SOCK_STREAM;
 
-	ai = camel_getaddrinfo(url->host, serv, &hints, NULL);
-	if (ai == NULL) {
-		camel_object_unref (stream);
-		return NULL;
-	}
-
-	if (camel_tcp_stream_connect (CAMEL_TCP_STREAM (stream), ai) == -1) {
+	if (camel_tcp_stream_connect (CAMEL_TCP_STREAM (stream), url->host, serv, 0, NULL) == -1) { /* NULL-CamelException */
 		errsave = errno;
 		camel_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]