[SR-Users] dialog: cseq
Randhir Singh
randhir.bhatti at gmail.com
Mon Jul 1 05:05:04 CEST 2013
Hbhj av
On 14 Jun 2013 17:33, "Halina Nowak" <halina at mbdsys.com> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130701/eaae5012/attachment.html>
More information about the sr-users
mailing list