Use hostport, not ipport for proxied connections
[pazpar2-moved-to-github.git] / src / connection.c
index 8311ada..c55785d 100644 (file)
@@ -194,8 +194,8 @@ static void non_block_events(struct connection *co)
             continue;
         ev = ZOOM_connection_last_event(link);
         
-#if 0
-        yaz_log(YLOG_LOG, "%p Connection ZOOM_EVENT_%s", co, ZOOM_get_event_str(ev));
+#if 1
+        yaz_log(YLOG_DEBUG, "%p Connection ZOOM_EVENT_%s", co, ZOOM_get_event_str(ev));
 #endif
         switch (ev) 
         {
@@ -432,6 +432,8 @@ static int connection_connect(struct connection *con, iochan_man_t iochan_man)
         strcat(http_hostport, host->hostport);
         ZOOM_connection_connect(link, http_hostport, 0);
     }
+    else if (zproxy && *zproxy)
+        ZOOM_connection_connect(link, host->hostport, 0);        
     else
         ZOOM_connection_connect(link, host->ipport, 0);