diff libpurple/sslconn.c @ 18929:67cb28c0ec89

applied changes from e52b685d84ca8874da6e3e71199829e513500642 through 504a3dc38ec168dab1f4443c13d14858db47cd70 - Pulling the ssl_connect_with_host_fd change from soc.2007.xmpp
author William Ehlhardt <williamehlhardt@gmail.com>
date Thu, 21 Jun 2007 19:21:47 +0000
parents 3bccbafea8c1
children f41a561e3b7b e634122cec47
line wrap: on
line diff
--- a/libpurple/sslconn.c	Thu Jun 21 19:14:06 2007 +0000
+++ b/libpurple/sslconn.c	Thu Jun 21 19:21:47 2007 +0000
@@ -154,7 +154,18 @@
 PurpleSslConnection *
 purple_ssl_connect_fd(PurpleAccount *account, int fd,
 					PurpleSslInputFunction func,
-					PurpleSslErrorFunction error_func, void *data)
+					PurpleSslErrorFunction error_func,
+                    void *data)
+{
+    return purple_ssl_connect_with_host_fd(account, fd, func, error_func, NULL, data);
+}
+
+PurpleSslConnection *
+purple_ssl_connect_with_host_fd(PurpleAccount *account, int fd,
+                      PurpleSslInputFunction func,
+                      PurpleSslErrorFunction error_func,
+                      const char *host,
+                      void *data)
 {
 	PurpleSslConnection *gsc;
 	PurpleSslOps *ops;
@@ -175,6 +186,8 @@
 	gsc->connect_cb      = func;
 	gsc->error_cb        = error_func;
 	gsc->fd              = fd;
+    if(host)
+        gsc->host            = g_strdup(host);
 
 	ops = purple_ssl_get_ops();
 	ops->connectfunc(gsc);