Ticket #3154 (new defect)
Threading code in jabber makes no sense
| Reported by: | arivanov | Owned by: | deryni |
|---|---|---|---|
| Milestone: | Component: | XMPP | |
| Version: | 2.2.0 | Keywords: | |
| Cc: |
Description
I am trying to figure out the threading portion of jabber to allow for better logging using jabberd(2) and bandersnatch. When reading the relevant portions of the pifgin jabber implementation I came along the following code snippet:
Version 2.2.0:
message.c around line 129
if(jbr->thread_id)
g_free(jbr->thread_id);
jbr->thread_id = g_strdup(jbr->thread_id);
If I understand it correctly the thread_id gets freed if non NULL and after that the freed string gets dup-ed.
I apologise, but this does not quite make sense to me. If I understand correctly this will always result the jbr->tread_id being equal NULL.



