Quoting [EMAIL PROTECTED] from ml.softs.gtk-gnutella.devel:
:I'm not sure, but the following patch should do the job.
:
:Index: pproxy.c
:===================================================================
:RCS file: /cvsroot/gtk-gnutella/gtk-gnutella-current/src/pproxy.c,v
:retrieving revision 1.11
:diff -u -r1.11 pproxy.c
:--- pproxy.c   4 Aug 2003 20:27:29 -0000       1.11
:+++ pproxy.c   5 Aug 2003 21:22:27 -0000
:@@ -851,6 +851,7 @@
:               if (cp->http_handle != NULL) {
:                       g_warning("retrying with swapped push-proxy address %s (was 
%s)",
:                               ip_to_gchar(new_ip), ip_port_to_gchar(cp->ip, 
cp->port));
:+                      http_async_set_opaque(cp->http_handle, cp, NULL);
:                       cp->ip = new_ip;
:                       return;
:               }
:
:-=-=-=-=-=-

You forgot:

        http_async_set_op_request(cp->http_handle, cproxy_build_request);
        http_async_on_state_change(cp->http_handle, cproxy_http_newstate);

The actual changes between 1.12 and 1.11 are:

Index: pproxy.c
===================================================================
RCS file: /cvsroot/gtk-gnutella/gtk-gnutella-current/src/pproxy.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- pproxy.c    4 Aug 2003 20:27:29 -0000       1.11
+++ pproxy.c    5 Aug 2003 06:28:24 -0000       1.12
@@ -1,5 +1,5 @@
 /*
- * $Id: pproxy.c,v 1.11 2003/08/04 20:27:29 rmanfredi Exp $
+ * $Id: pproxy.c,v 1.12 2003/08/05 06:28:24 rmanfredi Exp $
  *
  * Copyright (c) 2003, Raphael Manfredi
  *
@@ -50,7 +50,7 @@
 #include "token.h"
 #include "downloads.h"
 
-RCSID("$Id: pproxy.c,v 1.11 2003/08/04 20:27:29 rmanfredi Exp $");
+RCSID("$Id: pproxy.c,v 1.12 2003/08/05 06:28:24 rmanfredi Exp $");
 
 /***
  *** Server-side of push-proxy
@@ -755,8 +755,12 @@
  *** Client-side of push-proxy
  ***/
 
+// XXX needed only because of the temporary hack below -- RAM, 05/08/2003
 static gboolean cproxy_http_header_ind(
        gpointer handle, header_t *header, gint code, const gchar *message);
+static gint cproxy_build_request(gpointer handle, gchar *buf, gint len,
+       gchar *verb, gchar *path, gchar *host);
+static void cproxy_http_newstate(gpointer handle, http_state_t newstate);
 
 #define CPROXY_MAGIC   0xc8301
 
@@ -852,6 +856,15 @@
                        g_warning("retrying with swapped push-proxy address %s (was 
%s)",
                                ip_to_gchar(new_ip), ip_port_to_gchar(cp->ip, 
cp->port));
                        cp->ip = new_ip;
+
+                       /*
+                        * Customize async HTTP layer.
+                        */
+
+                       http_async_set_opaque(cp->http_handle, cp, NULL);
+                       http_async_set_op_request(cp->http_handle, 
cproxy_build_request);
+                       http_async_on_state_change(cp->http_handle, 
cproxy_http_newstate);
+
                        return;
                }
 
Raphael


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to