- Aligned to new prototypes of functions in usr_avp.h
authorJan Janak <jan@iptel.org>
Thu, 17 Nov 2005 13:20:25 +0000 (13:20 +0000)
committerJan Janak <jan@iptel.org>
Thu, 17 Nov 2005 13:20:25 +0000 (13:20 +0000)
- clone missing attributes in to_body

modules/tm/h_table.c
modules/tm/sip_msg.c
modules/tm/t_fifo.c
modules/tm/t_funcs.c
modules/tm/t_hooks.c
modules/tm/t_reply.c
modules/tm/uac.c

index fd9e77d..3891b25 100644 (file)
@@ -246,7 +246,7 @@ struct cell*  build_cell( struct sip_msg* p_msg )
        new_cell->uas.response.my_T=new_cell;
 
        /* move the current avp list to transaction -bogdan */
-       old = set_avp_list( &new_cell->user_avps );
+       old = set_user_avp_list( &new_cell->user_avps );
        new_cell->user_avps = *old;
        *old = 0;
 
@@ -283,7 +283,7 @@ error:
        destroy_avp_list(&new_cell->user_avps);
        shm_free(new_cell);
        /* unlink transaction AVP list and link back the global AVP list (bogdan)*/
-       reset_avps();
+       reset_user_avps();
        return NULL;
 }
 
index 257a27f..4135065 100644 (file)
@@ -559,6 +559,9 @@ do { \
                                ((struct to_body*)new_hdr->parsed)->body.s =
                                        translate_pointer( new_msg->buf , org_msg->buf ,
                                        ((struct to_body*)hdr->parsed)->body.s );
+                               ((struct to_body*)new_hdr->parsed)->display.s = 
+                                       translate_pointer( new_msg->buf, org_msg->buf,
+                                       ((struct to_body*)hdr->parsed)->display.s);
                                ((struct to_body*)new_hdr->parsed)->uri.s =
                                        translate_pointer( new_msg->buf , org_msg->buf ,
                                        ((struct to_body*)hdr->parsed)->uri.s );
index e8ba6f1..bd28ee1 100644 (file)
@@ -598,11 +598,11 @@ static inline char* append2buf( char *buf, int len, struct sip_msg *req,
                        /* search for the AVP */
                        if (ha->sval.s) {
                                avp_name.s=&ha->sval;
-                               avp = search_first_avp( AVP_NAME_STR, avp_name, &avp_val);
+                               avp = search_first_avp( AVP_NAME_STR, avp_name, &avp_val, 0);
                                DBG("AVP <%.*s>: %p\n",avp_name.s->len,avp_name.s->s,avp);
                        } else {
                                avp_name.n=ha->ival;
-                               avp = search_first_avp( 0, avp_name, &avp_val);
+                               avp = search_first_avp( 0, avp_name, &avp_val, 0);
                                DBG("AVP <%i>: %p\n",avp_name.n,avp);
                        }
                        if (avp) {
index 39fefa2..ff57109 100644 (file)
@@ -326,7 +326,7 @@ static inline int avp2timer(unsigned int* timer, int type, int_str name)
        int_str val_istr;
        int err;
 
-       avp = search_first_avp( type, name, &val_istr);
+       avp = search_first_avp( type, name, &val_istr, 0);
        if (!avp) {
                /*
                 DBG("avp2timer: AVP '%.*s' not found\n", param.s->len, ZSW(param.s->s));
index 8331719..f199dfa 100644 (file)
@@ -181,7 +181,7 @@ void run_trans_callbacks( int type , struct cell *trans,
        if (trans->tmcb_hl.first==0 || ((trans->tmcb_hl.reg_types)&type)==0 )
                return;
 
-       backup = set_avp_list( &trans->user_avps );
+       backup = set_user_avp_list( &trans->user_avps );
        for (cbp=trans->tmcb_hl.first; cbp; cbp=cbp->next)  {
                if ( (cbp->types)&type ) {
                        DBG("DBG: trans=%p, callback type %d, id %d entered\n",
@@ -189,7 +189,7 @@ void run_trans_callbacks( int type , struct cell *trans,
                        params.param = &(cbp->param);
                        cbp->callback( trans, type, &params );
                }
-       set_avp_list( backup );
+       set_user_avp_list( backup );
        }
 }
 
@@ -207,13 +207,13 @@ void run_reqin_callbacks( struct cell *trans, struct sip_msg *req, int code )
        if (req_in_tmcb_hl->first==0)
                return;
 
-       backup = set_avp_list( &trans->user_avps );
+       backup = set_user_avp_list( &trans->user_avps );
        for (cbp=req_in_tmcb_hl->first; cbp; cbp=cbp->next)  {
                DBG("DBG: trans=%p, callback type %d, id %d entered\n",
                        trans, cbp->types, cbp->id );
                params.param = &(cbp->param);
                cbp->callback( trans, cbp->types, &params );
        }
-       set_avp_list( backup );
+       set_user_avp_list( backup );
 }
 
index 192b275..4be7f8d 100644 (file)
@@ -513,7 +513,7 @@ static inline void faked_env( struct cell *t,struct sip_msg *msg)
                global_msg_id=msg->id;
                set_t(t);
                /* make available the avp list from transaction */
-               backup_list = set_avp_list( &t->user_avps );
+               backup_list = set_user_avp_list( &t->user_avps );
                /* set default send address to the saved value */
                backup_si=bind_address;
                bind_address=t->uac[0].request.dst.send_sock;
@@ -523,7 +523,7 @@ static inline void faked_env( struct cell *t,struct sip_msg *msg)
                global_msg_id=backup_msgid;
                rmode=backup_mode;
                /* restore original avp list */
-               set_avp_list( backup_list );
+               set_user_avp_list( backup_list );
                bind_address=backup_si;
        }
 }
@@ -1324,13 +1324,13 @@ int reply_received( struct sip_msg  *p_msg )
                /* transfer transaction flag to message context */
                if (t->uas.request) p_msg->flags=t->uas.request->flags;
                /* set the as avp_list the one from transaction */
-               backup_list = set_avp_list( &t->user_avps );
+               backup_list = set_user_avp_list( &t->user_avps );
                if (run_actions(onreply_rlist[t->on_reply], p_msg)<0)
                        LOG(L_ERR, "ERROR: on_reply processing failed\n");
                /* transfer current message context back to t */
                if (t->uas.request) t->uas.request->flags=p_msg->flags;
                /* restore original avp list */
-               set_avp_list( backup_list );
+               set_user_avp_list( backup_list );
        }
        LOCK_REPLIES( t );
        if ( is_local(t) ) {
@@ -1372,7 +1372,7 @@ int reply_received( struct sip_msg  *p_msg )
                           attempt to restart retransmission any more
                        */
 
-                       backup_list = set_avp_list( &t->user_avps );
+                       backup_list = set_user_avp_list( &t->user_avps );
                        if (!fr_inv_avp2timer(&timer)) {
                                DBG("reply_received: FR_INV_TIMER = %d\n", timer);
                                set_timer( & uac->request.fr_timer,
@@ -1382,7 +1382,7 @@ int reply_received( struct sip_msg  *p_msg )
                                set_timer( & uac->request.fr_timer,
                                           FR_INV_TIMER_LIST, 0 );
                        }
-                       set_avp_list( backup_list );
+                       set_user_avp_list( backup_list );
                } else {
                             /* non-invite: restart retransmissions (slow now) */
                        uac->request.retr_list=RT_T2;
index 4587572..48e3cc8 100644 (file)
@@ -202,7 +202,7 @@ int t_uac(str* method, str* headers, str* body, dlg_t* dialog,
 
        /* better reset avp list now - anyhow, it's useless from
         * this point (bogdan) */
-       reset_avps();
+       reset_user_avps();
 
        /* add the callback the the transaction for LOCAL_COMPLETED event */
        if(cb && insert_tmcb(&(new_cell->tmcb_hl),TMCB_LOCAL_COMPLETED,cb,cbp)!=1){