[Pidgin] #15684: BOSH does not process all responses in buffer
Pidgin
trac at pidgin.im
Mon Jan 13 21:36:37 EST 2014
#15684: BOSH does not process all responses in buffer
------------------------------------+-------------------------
Reporter: flopma | Owner: darkrain42
Type: defect | Status: new
Milestone: Patches Needing Review | Component: libpurple
Version: 2.10.7 | Resolution:
Keywords: bosh |
------------------------------------+-------------------------
Comment (by MarkDoliner):
Some feedback:
* It's unfortunate that we have to g_strndup the body when printing it in
purple_debug_info. It would be nice if we could first check if the log
statement would even be written. Unfortunately this is really messy. It
might be easier in main (if it's not easier then we should make it
easier). In 2.x.y we'd have to do something like this, but it's really
ugly and not worth it:
{{{
PurpleDebugUiOps *ops
ops = purple_debug_get_ui_ops();
if (purple_debug_is_enabled() || (ops
&& ops->print
&& (!ops->is_enabled || ops->is_enabled(PURPLE_DEBUG_INFO,
"jabber")))) {
message = g_strndup(data, len);
purple_debug_info(stuff);
g_free(message);
}
}}}
* Shifting the latter responses to the beginning of conn->read_buf isn't a
great solution. It would be much better to leave the bytes where they are
and just start parsing in the middle. But this is fine, since this is
2.x.y and we're getting rid of the http handling here in main.
* Most importantly, does something actually call
jabber_bosh_http_connection_process() again? Maybe it should be called in
a while loop?
--
Ticket URL: <https://developer.pidgin.im/ticket/15684#comment:5>
Pidgin <https://pidgin.im>
Pidgin
More information about the Tracker
mailing list