[sr-dev] git:3.2: dialog(k): give dir parameter to get_dlg()

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 2 00:43:15 CET 2011


Module: sip-router
Branch: 3.2
Commit: 31c99120ba9f13630b03ce43d9d76b7c322da0d6
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=31c99120ba9f13630b03ce43d9d76b7c322da0d6

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Dec  2 00:37:18 2011 +0100

dialog(k): give dir parameter to get_dlg()

- initialized to DLG_DIR_NONE to fix accessing NULL pointer for
  searching dialog by msg attributes
- patch by Jasmin Schnatterbeck
(cherry picked from commit fc0f544b25c157147f8b813be6ba594b20ee6757)

---

 modules_k/dialog/dlg_handlers.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules_k/dialog/dlg_handlers.c b/modules_k/dialog/dlg_handlers.c
index 9c4686a..2a1e494 100644
--- a/modules_k/dialog/dlg_handlers.c
+++ b/modules_k/dialog/dlg_handlers.c
@@ -975,8 +975,9 @@ dlg_cell_t *dlg_get_msg_dialog(sip_msg_t *msg)
 {
 	dlg_cell_t *dlg = NULL;
 	str callid;
-    str ftag;
-    str ttag;
+	str ftag;
+	str ttag;
+	unsigned int dir;
 
 	/* Retrieve the current dialog */
 	dlg = dlg_get_ctx_dialog();
@@ -985,7 +986,8 @@ dlg_cell_t *dlg_get_msg_dialog(sip_msg_t *msg)
 	
 	if (pre_match_parse(msg, &callid, &ftag, &ttag, 0)<0)
 		return NULL;
-	dlg = get_dlg(&callid, &ftag, &ttag, NULL);
+	dir = DLG_DIR_NONE;
+	dlg = get_dlg(&callid, &ftag, &ttag, &dir);
 	if (dlg==NULL){
 		LM_DBG("dlg with callid '%.*s' not found\n",
 				msg->callid->body.len, msg->callid->body.s);




More information about the sr-dev mailing list