soc.2008.xmpp: 889c6080: * preparing handling of multiple request...

tfar at soc.pidgin.im tfar at soc.pidgin.im
Fri Aug 15 10:11:23 EDT 2008


-----------------------------------------------------------------
Revision: 889c6080de6c279c7deab72951807b17cdeba58f
Ancestor: e1259758bc3194ab721de0264bde25c000993fc9
Author: tfar at soc.pidgin.im
Date: 2008-08-09T23:07:58
Branch: im.pidgin.soc.2008.xmpp
URL: http://d.pidgin.im/viewmtn/revision/info/889c6080de6c279c7deab72951807b17cdeba58f

Modified files:
        libpurple/protocols/jabber/bosh.c
        libpurple/protocols/jabber/bosh.h

ChangeLog: 

* preparing handling of multiple requests for pipelining support

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/bosh.c	2eb398c5f4febd3bb7d7cec90ec79ab44fc0005e
+++ libpurple/protocols/jabber/bosh.c	07a22aa1b65e69750d45fae673d2ad2761c75be0
@@ -105,7 +105,16 @@ static void jabber_bosh_http_connection_
 
 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 @@ void jabber_bosh_http_connection_init(Pu
 	conn->host = host;
 	conn->port = port;
 	conn->connect_cb = NULL;
+	conn->current_response = NULL;
 	conn->requests = g_queue_new();
 }
 
============================================================
--- libpurple/protocols/jabber/bosh.h	5ea02d3f878b0e3fcdb0107e78207487ad05ecfc
+++ libpurple/protocols/jabber/bosh.h	b7456af0c899a280bdd1964e95fb37dcb9a20a5e
@@ -65,6 +65,7 @@ struct _PurpleHTTPConnection {
     PurpleConnection *conn;
     PurpleAccount *account;
     GQueue *requests;
+    PurpleHTTPResponse *current_response;
     int pih;
     PurpleHTTPConnectionConnectFunction connect_cb;
     void *userdata;


More information about the Commits mailing list