changeset 25603:24b97b8359ff

* preparing handling of multiple requests for pipelining support
author Tobias Markmann <tfar@soc.pidgin.im>
date Sat, 09 Aug 2008 23:07:58 +0000
parents f9322be084c4
children e28f1711f402
files libpurple/protocols/jabber/bosh.c libpurple/protocols/jabber/bosh.h
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/bosh.c	Sat Aug 09 22:16:11 2008 +0000
+++ b/libpurple/protocols/jabber/bosh.c	Sat Aug 09 23:07:58 2008 +0000
@@ -105,7 +105,16 @@
 
 static void jabber_bosh_http_connection_receive(gpointer data, gint source, PurpleInputCondition condition) {
 	PurpleHTTPConnection *conn = data;
+	PurpleHTTPResponse *response = conn->current_response;
+	
 	purple_debug_info("jabber", "jabber_bosh_http_connection_receive\n");
+	if (response) {
+		// data for current response
+		
+	} else {
+		// new response
+		response = conn->current_response = g_new0(PurpleHTTPResponse, 1);
+	}
 }
 
 void jabber_bosh_http_connection_init(PurpleHTTPConnection *conn, PurpleAccount *account, char *host, int port) {
@@ -113,6 +122,7 @@
 	conn->host = host;
 	conn->port = port;
 	conn->connect_cb = NULL;
+	conn->current_response = NULL;
 	conn->requests = g_queue_new();
 }
 
--- a/libpurple/protocols/jabber/bosh.h	Sat Aug 09 22:16:11 2008 +0000
+++ b/libpurple/protocols/jabber/bosh.h	Sat Aug 09 23:07:58 2008 +0000
@@ -65,6 +65,7 @@
     PurpleConnection *conn;
     PurpleAccount *account;
     GQueue *requests;
+    PurpleHTTPResponse *current_response;
     int pih;
     PurpleHTTPConnectionConnectFunction connect_cb;
     void *userdata;