[Pidgin] #12622: BOSH connection to XMPP server through proxy fails

Pidgin trac at pidgin.im
Sat Sep 11 00:55:05 EDT 2010


#12622: BOSH connection to XMPP server through proxy fails
--------------------------+-------------------------------------------------
 Reporter:  hgiddens      |     Owner:  rekkanoryo
     Type:  patch         |    Status:  new       
Component:  unclassified  |   Version:  2.7.3     
 Keywords:                |  
--------------------------+-------------------------------------------------
 Connecting to an XMPP server via BOSH through a HTTP proxy that presumably
 doesn't support pipelining fails with the message "Lost connection with
 server: Bad file descriptor". stracing pidgin reveals that write is being
 called with a file descriptor of -1:
 {{{
 write(-1, "POST /http-bind/ HTTP/1.1\r\nHost:"..., 393) = -1 EBADF
 }}}

 This seems to be caused by the pipelining-not-supported path in
 `http_connection_disconnected` in bosh.c which calls
 `http_connection_connect` on `conn->bosh->connections[1]` before trying to
 reconnect `conn` (i.e., `conn->bosh->connections[0]`). The connection
 callback for `connections[1]` is then called before the callback for
 `connections[0]`, and when `jabber_bosh_connection_boot` is called, it
 passes the uninitialised `connections[0]` to
 `http_connection_send_request`.

 The attached patch fixes this by reconnecting `connections[0]` before
 `connections[1]`.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/12622>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list