Mercurial > pidgin.yaz
comparison libpurple/protocols/simple/simple.c @ 16171:3e400c5b0b51
simple-crashfix.diff from achris in ticket #98. This is a fix for the crasher,
as opposed to the fix for the bug that triggered the crasher.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 15 Apr 2007 22:55:36 +0000 |
parents | af92b284664a |
children | a338acd14365 |
comparison
equal
deleted
inserted
replaced
16170:8150347691d2 | 16171:3e400c5b0b51 |
---|---|
591 static struct transaction *transactions_find(struct simple_account_data *sip, struct sipmsg *msg) { | 591 static struct transaction *transactions_find(struct simple_account_data *sip, struct sipmsg *msg) { |
592 struct transaction *trans; | 592 struct transaction *trans; |
593 GSList *transactions = sip->transactions; | 593 GSList *transactions = sip->transactions; |
594 gchar *cseq = sipmsg_find_header(msg, "CSeq"); | 594 gchar *cseq = sipmsg_find_header(msg, "CSeq"); |
595 | 595 |
596 while(transactions) { | 596 if (cseq) { |
597 trans = transactions->data; | 597 while(transactions) { |
598 if(!strcmp(trans->cseq, cseq)) { | 598 trans = transactions->data; |
599 return trans; | 599 if(!strcmp(trans->cseq, cseq)) { |
600 } | 600 return trans; |
601 transactions = transactions->next; | 601 } |
602 transactions = transactions->next; | |
603 } | |
604 } else { | |
605 purple_debug(PURPLE_DEBUG_MISC, "simple", "Received message contains no CSeq header.\n"); | |
602 } | 606 } |
603 | 607 |
604 return NULL; | 608 return NULL; |
605 } | 609 } |
606 | 610 |