<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
some comments inline.<br>
<br>
<div class="moz-cite-prefix">On 6/14/13 2:03 PM, Halina Nowak wrote:<br>
</div>
<blockquote cite="mid:51BB067E.3060208@mbdsys.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<font size="-1">Proposal for cseq:<br>
<br>
cseq numbering:<br>
<br>
--- a/modules/dialog/dlg_handlers.c Wed Apr 03 13:33:38 2013
+0200<br>
+++ b/modules/dialog/dlg_handlers.c Fri Jun 14 13:39:47 2013
+0200<br>
@@ -220,7 +220,7 @@<br>
cseq = (get_cseq(msg))->number;<br>
} else {<br>
/* use the same as in request */<br>
- cseq = dlg->cseq[DLG_CALLER_LEG];<br>
+ cseq = dlg->cseq[DLG_CALLEE_LEG];<br>
</font></blockquote>
<br>
<font size="-1">at quick check, the comment says the cseq is taken
from the request because it is processing the reply in this part
of the code.<br>
<br>
You change that to take the value of the stored cseq for callee,
which is different than the current processed message.<br>
<br>
What was the problem you discovered? Can you give an example to
understand this change?<br>
<br>
</font>
<blockquote cite="mid:51BB067E.3060208@mbdsys.com" type="cite"><font
size="-1"> }<br>
<br>
<br>
avoid memory leak:<br>
<br>
--- a/modules/dialog/dlg_hash.c Fri Jun 14 13:40:12 2013
+0200<br>
+++ b/modules/dialog/dlg_hash.c Fri Jun 14 13:45:21 2013
+0200<br>
@@ -485,7 +485,14 @@<br>
char *p;<br>
<br>
dlg->tag[leg].s = (char*)shm_malloc( tag->len +
rr->len + contact->len );<br>
- dlg->cseq[leg].s = (char*)shm_malloc( cseq->len );<br>
+ if(dlg->cseq[leg].s){<br>
+ if (dlg->cseq[leg].len < cseq->len) {<br>
+ shm_free(dlg->cseq[leg].s);<br>
+ dlg->cseq[leg].s = (char*)shm_malloc(cseq->len);<br>
+ }<br>
+ }else{<br>
+ dlg->cseq[leg].s = (char*)shm_malloc( cseq->len );<br>
+ }<br>
if ( dlg->tag[leg].s==NULL || dlg->cseq[leg].s==NULL)
{<br>
LM_ERR("no more shm mem\n");<br>
if (dlg->tag[leg].s)<br>
</font></blockquote>
I see tag is also allocated each time, isn't it exposed to same
issue? You changed only cseq to reuse existing buffer or free the
old one and allocate a bigger one when needed.<br>
<br>
Cheers,<br>
Daniel<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
</pre>
</body>
</html>