Module: sip-router
Branch: mariusbucur/conference
Commit: 58060d299df6d0e9d4beb9cf42d588807abf6ac7
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=58060d2…
Author: mariusbucur <marius(a)marius-bucur.ro>
Committer: mariusbucur <marius(a)marius-bucur.ro>
Date: Mon Jul 26 11:17:13 2010 +0300
added correct error checking for the parse_to function in subscribe.c
---
modules_k/presence/subscribe.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules_k/presence/subscribe.c b/modules_k/presence/subscribe.c
index 2fa38e1..0517aa8 100644
--- a/modules_k/presence/subscribe.c
+++ b/modules_k/presence/subscribe.c
@@ -37,6 +37,7 @@
#include "../../data_lump_rpl.h"
#include "../../parser/parse_expires.h"
#include "../../parser/parse_event.h"
+#include "../../parser/parse_def.h"
#include "../../parser/contact/parse_contact.h"
#include "../../lib/kcore/hash_func.h"
#include "../../lib/kcore/parser_helpers.h"
@@ -798,7 +799,8 @@ int extract_sdialog_info(subs_t* subs,struct sip_msg* msg, int mexp,
else
{
memset( &TO , 0, sizeof(TO) );
- if( !parse_to(msg->to->body.s,msg->to->body.s + msg->to->body.len +
1, &TO))
+ parse_to(msg->to->body.s,msg->to->body.s + msg->to->body.len + 1,
&TO);
+ if(TO.error == PARSE_ERROR)
{
LM_DBG("'To' header NOT parsed\n");
goto error;