router.c.patch   [plain text]


--- /tmp/jabberd-2.2.13/s2s/router.c	2011-02-23 08:24:34.000000000 -0800
+++ ./jabberd2/s2s/router.c	2011-02-24 16:25:21.000000000 -0800
@@ -145,7 +145,7 @@ int s2s_router_sx_callback(sx_t s, sx_ev
                     if(ns >= 0) {
                         elem = nad_find_elem(nad, 0, ns, "starttls", 1);
                         if(elem >= 0) {
-                            if(sx_ssl_client_starttls(s2s->sx_ssl, s, s2s->router_pemfile) == 0) {
+                            if(sx_ssl_client_starttls(s2s->sx_ssl, s, s2s->router_pemfile, s2s->router_private_key_password) == 0) {
                                 nad_free(nad);
                                 return 0;
                             }
@@ -281,6 +281,7 @@ int s2s_router_sx_callback(sx_t s, sx_ev
 
         case event_CLOSED:
             mio_close(s2s->mio, s2s->fd);
+            s2s->fd = NULL;
             return -1;
     }