Browse code

changing the name of functs form msg_translator

Bogdan-Andrei Iancu authored on 29/11/2001 12:20:18
Showing 4 changed files
... ...
@@ -44,7 +44,7 @@ int forward_request( struct sip_msg* msg, struct proxy_l * p)
44 44
 	struct sockaddr_in* to;
45 45
 
46 46
 
47
-	buf = build_buf_from_sip_request( msg, &len);
47
+	buf = build_req_buf_from_sip_req( msg, &len);
48 48
 	if (!buf){
49 49
 		LOG(L_ERR, "ERROR: forward_reply: building failed\n");
50 50
 		goto error;
... ...
@@ -134,7 +134,7 @@ int forward_reply(struct sip_msg* msg)
134 134
 
135 135
 	/* here will be called the T Module !!!!!!  */
136 136
 
137
-	new_buf = build_buf_from_sip_request( msg, &new_len);
137
+	new_buf = build_res_buf_from_sip_res( msg, &new_len);
138 138
 	if (!new_buf){
139 139
 		LOG(L_ERR, "ERROR: forward_reply: building failed\n");
140 140
 		goto error;
... ...
@@ -6,10 +6,9 @@ unsigned int     global_msg_id;
6 6
 struct s_table*  hash_table;
7 7
 int                      sock_fd;
8 8
 
9
-int t_cancel_branch(unsigned int branch)
10
-{
11
-	LOG(L_ERR, "ERROR: t_cancel_branch: NOT IMPLEMENTED YET\n");
12
-}
9
+
10
+
11
+
13 12
 
14 13
 int tm_startup()
15 14
 {
... ...
@@ -254,7 +253,7 @@ int t_forward( struct sip_msg* p_msg , unsigned int dest_ip_param , unsigned int
254 254
       T->outbound_request[0]->to.sin_port     = htonl( dest_port ) ;
255 255
       T->outbound_request[0]->to.sin_addr.s_addr = ntohl( dest_ip ) ;
256 256
 
257
-      buf = build_buf_from_sip_request  ( p_msg, &len);
257
+      buf = build_req_buf_from_sip_req ( p_msg, &len);
258 258
       if (!buf)
259 259
          return -1;
260 260
       T->outbound_request[0]->bufflen = len ;
... ...
@@ -269,7 +268,7 @@ int t_forward( struct sip_msg* p_msg , unsigned int dest_ip_param , unsigned int
269 269
    T->outbound_request[0]->max_retrans = (T->inbound_request->first_line.u.request.method_value==METHOD_INVITE) ? MAX_INVITE_RETR : MAX_NON_INVITE_RETR;
270 270
    T->outbound_request[0]->timeout         = RETR_T1;
271 271
    /* send the request */
272
-   udp_send( T->outbound_request[0]->buffer , T->outbound_request[0]->bufflen , &(T->outbound_request[0]->to) , sizeof(struct sockaddr_in) );
272
+   udp_send( T->outbound_request[0]->buffer , T->outbound_request[0]->bufflen , (struct sockaddr*)&(T->outbound_request[0]->to) , sizeof(struct sockaddr_in) );
273 273
 }
274 274
 
275 275
 
... ...
@@ -406,7 +405,7 @@ int t_retransmit_reply( struct sip_msg* p_msg )
406 406
    /* if no transaction exists or no reply to be resend -> out */
407 407
    if ( T  && T->inbound_response )
408 408
    {
409
-      udp_send( T->inbound_response->buffer , T->inbound_response->bufflen , &(T->inbound_response->to) , sizeof(struct sockaddr_in) );
409
+      udp_send( T->inbound_response->buffer , T->inbound_response->bufflen , (struct sockaddr*)&(T->inbound_response->to) , sizeof(struct sockaddr_in) );
410 410
       return 0;
411 411
    }
412 412
 
... ...
@@ -689,7 +688,7 @@ int push_reply_from_uac_to_uas( struct sip_msg *p_msg , unsigned int branch )
689 689
    }
690 690
 
691 691
    /*  */
692
-   buf = build_buf_from_sip_response  ( p_msg, &len);
692
+   buf = build_res_buf_from_sip_res ( p_msg, &len);
693 693
    if (!buf)
694 694
         return -1;
695 695
    T->inbound_response->bufflen = len ;
... ...
@@ -707,6 +706,16 @@ int push_reply_from_uac_to_uas( struct sip_msg *p_msg , unsigned int branch )
707 707
 
708 708
 
709 709
 
710
+/*
711
+  */
712
+int t_cancel_branch(unsigned int branch)
713
+{
714
+	LOG(L_ERR, "ERROR: t_cancel_branch: NOT IMPLEMENTED YET\n");
715
+}
716
+
717
+
718
+
719
+
710 720
 /* Builds an ACK request based on an INVITE request. ACK is send
711 721
   * to same address
712 722
   */
... ...
@@ -769,7 +778,7 @@ int t_build_and_send_ACK( struct cell *Trans, unsigned int branch)
769 769
    *(p++) = '\n';
770 770
 
771 771
    /* sends the ACK message to the same destination as the INVITE */
772
-   udp_send( ack_buf, p-ack_buf, &(T->outbound_request[branch]->to) , sizeof(struct sockaddr_in) );
772
+   udp_send( ack_buf, p-ack_buf, (struct sockaddr*)&(T->outbound_request[branch]->to) , sizeof(struct sockaddr_in) );
773 773
 
774 774
    /* free mem*/
775 775
    free( ack_buf );
... ...
@@ -856,3 +865,4 @@ void delete_handler( void *attr)
856 856
        add_to_tail_of_timer_list( hash_table, &(p_cell->tl[DELETE_LIST]), DELETE_LIST, DEL_TIME_OUT );
857 857
 }
858 858
 
859
+
... ...
@@ -110,7 +110,7 @@ int check_address(unsigned long ip, char *name, int resolver)
110 110
 
111 111
 
112 112
 
113
-char * build_buf_from_sip_request(struct sip_msg* msg, unsigned int *returned_len)
113
+char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_len)
114 114
 {
115 115
 	unsigned int len, new_len, via_len, received_len, uri_len;
116 116
 	char* line_buf;
... ...
@@ -400,7 +400,7 @@ error:
400 400
 
401 401
 
402 402
 
403
-char * build_buf_from_sip_response(struct sip_msg* msg, unsigned int *returned_len)
403
+char * build_res_buf_from_sip_res(struct sip_msg* msg, unsigned int *returned_len)
404 404
 {
405 405
 	unsigned int new_len, via_len,r;
406 406
 	char* new_buf;
... ...
@@ -460,3 +460,12 @@ error:
460 460
 
461 461
 
462 462
 
463
+
464
+
465
+char * build_res_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_len)
466
+{
467
+}
468
+
469
+
470
+
471
+
... ...
@@ -3,9 +3,11 @@
3 3
 
4 4
 #include "msg_parser.h"
5 5
 
6
-char * build_buf_from_sip_request  (struct sip_msg* msg, unsigned int *returned_len);
7
-char * build_buf_from_sip_response(struct sip_msg* msg, unsigned int *returned_len);
6
+char * build_req_buf_from_sip_req  (struct sip_msg* msg, unsigned int *returned_len);
8 7
 
8
+char * build_res_buf_from_sip_res(struct sip_msg* msg, unsigned int *returned_len);
9
+
10
+char * build_res_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_len);
9 11
 
10 12
 
11 13