[SR-Users] dialog: cseq

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 18 10:50:01 CEST 2013


Hello,

thanks for the patches, I will review and commit as needed.

Cheers,
Daniel

On 6/14/13 2:03 PM, Halina Nowak wrote:
> Proposal for cseq:
>
> cseq numbering:
>
> --- a/modules/dialog/dlg_handlers.c    Wed Apr 03 13:33:38 2013 +0200
> +++ b/modules/dialog/dlg_handlers.c    Fri Jun 14 13:39:47 2013 +0200
> @@ -220,7 +220,7 @@
>          cseq = (get_cseq(msg))->number;
>      } else {
>          /* use the same as in request */
> -        cseq = dlg->cseq[DLG_CALLER_LEG];
> +        cseq = dlg->cseq[DLG_CALLEE_LEG];
>      }
>
>
> avoid memory leak:
>
> --- a/modules/dialog/dlg_hash.c    Fri Jun 14 13:40:12 2013 +0200
> +++ b/modules/dialog/dlg_hash.c    Fri Jun 14 13:45:21 2013 +0200
> @@ -485,7 +485,14 @@
>      char *p;
>
>      dlg->tag[leg].s = (char*)shm_malloc( tag->len + rr->len + 
> contact->len );
> -    dlg->cseq[leg].s = (char*)shm_malloc( cseq->len );
> +    if(dlg->cseq[leg].s){
> +      if (dlg->cseq[leg].len < cseq->len) {
> +        shm_free(dlg->cseq[leg].s);
> +        dlg->cseq[leg].s = (char*)shm_malloc(cseq->len);
> +      }
> +    }else{
> +      dlg->cseq[leg].s = (char*)shm_malloc( cseq->len );
> +    }
>      if ( dlg->tag[leg].s==NULL || dlg->cseq[leg].s==NULL) {
>          LM_ERR("no more shm mem\n");
>          if (dlg->tag[leg].s)
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
   * http://asipto.com/u/katu *

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130618/f4c6dbc3/attachment-0001.html>


More information about the sr-users mailing list