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

Author: Richard Good <[email protected]>
Committer: Richard Good <[email protected]>
Date:   Wed Oct 30 09:15:51 2013 +0200

modules/tm: code cleanup removed unused method faked_resp and free_faked_resp

---

 modules/tm/t_reply.c |   53 --------------------------------------------------
 modules/tm/t_reply.h |    3 --
 2 files changed, 0 insertions(+), 56 deletions(-)

diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index cac9ab4..562b583 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -806,59 +806,6 @@ static int _reply( struct cell *trans, struct sip_msg* 
p_msg,
        }
 }
 
-int fake_resp(struct sip_msg *faked_resp,
-               struct sip_msg *shmem_msg, int extra_flags, struct ua_client 
*uac)
-{
-       /* on_failure_reply faked msg now copied from shmem msg (as opposed
-       * to zero-ing) -- more "read-only" actions (exec in particular) will
-       * work from reply_route as they will see msg->from, etc.; caution,
-       * rw actions may append some pkg stuff to msg, which will possibly be
-       * never released (shmem is released in a single block) */
-       memcpy( faked_resp, shmem_msg, sizeof(struct sip_msg));
-
-       /* if we set msg_id to something different from current's message
-       * id, the first t_fork will properly clean new branch URIs */
-       faked_resp->id=shmem_msg->id-1;
-       /* msg->parsed_uri_ok must be reset since msg_parsed_uri is
-       * not cloned (and cannot be cloned) */
-       faked_resp->parsed_uri_ok = 0;
-
-       faked_resp->msg_flags|=extra_flags; /* set the extra tm flags */
-
-       if(uac) setbflagsval(0, uac->branch_flags);
-       else setbflagsval(0, 0);
-
-       return 1;
-}
-
-void free_faked_resp(struct sip_msg *faked_resp, struct cell *t, int branch)
-{
-       struct hdr_field *hdr;
-
-       /* free all types of lump that were added */
-       del_nonshm_lump( &(faked_resp->add_rm) );
-       del_nonshm_lump( &(faked_resp->body_lumps) );
-       del_nonshm_lump_rpl( &(faked_resp->reply_lump) );
-
-       /* free header's parsed structures that were added */
-       for( hdr=faked_resp->headers ; hdr ; hdr=hdr->next ) {
-               if ( hdr->parsed && hdr_allocs_parse(hdr) &&
-                       (hdr->parsed<(void*)t->uac[branch].reply)) {
-                       DBG("DBG:free_faked_resp: removing hdr->parsed %d\n",
-                               hdr->type);
- 
-                       clean_hdr_field(hdr);
-                       hdr->parsed = 0;
-               }
-       }
-       /* free parsed body added by failure handlers */
-       if (faked_resp->body) {
-               if(faked_resp->body->free)
-                       faked_resp->body->free(&faked_resp->body);
-                       faked_resp->body = 0;
-       }
-}
-
 /** create or restore a "fake environment" for running a failure_route, 
  * OR an "async environment" depending on is_async_value (0=std failure-faked, 
1=async)
  * if msg is set -> it will fake the env. vars conforming with the msg; if NULL
diff --git a/modules/tm/t_reply.h b/modules/tm/t_reply.h
index b4d2b0f..a98473f 100644
--- a/modules/tm/t_reply.h
+++ b/modules/tm/t_reply.h
@@ -238,11 +238,8 @@ void rpc_reply(rpc_t* rpc, void* c);
 void faked_env( struct cell *t,struct sip_msg *msg, int is_async_env);
 int fake_req(struct sip_msg *faked_req,
                struct sip_msg *shmem_msg, int extra_flags, struct ua_client 
*uac);
-int fake_resp(struct sip_msg *faked_req,
-               struct sip_msg *shmem_msg, int extra_flags, struct ua_client 
*uac);
 
 void free_faked_req(struct sip_msg *faked_req, struct cell *t);
-void free_faked_resp(struct sip_msg *faked_req, struct cell *t, int branch);
 
 typedef int (*tget_picked_f)(void);
 int t_get_picked_branch(void);


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to