... | ... |
@@ -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 | 253 |
T->outbound_request[0]->to.sin_port = htonl( dest_port ) ; |
255 | 254 |
T->outbound_request[0]->to.sin_addr.s_addr = ntohl( dest_ip ) ; |
256 | 255 |
|
257 |
- buf = build_buf_from_sip_request ( p_msg, &len); |
|
256 |
+ buf = build_req_buf_from_sip_req ( p_msg, &len); |
|
258 | 257 |
if (!buf) |
259 | 258 |
return -1; |
260 | 259 |
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 | 268 |
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 | 269 |
T->outbound_request[0]->timeout = RETR_T1; |
271 | 270 |
/* 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) ); |
|
271 |
+ udp_send( T->outbound_request[0]->buffer , T->outbound_request[0]->bufflen , (struct sockaddr*)&(T->outbound_request[0]->to) , sizeof(struct sockaddr_in) ); |
|
273 | 272 |
} |
274 | 273 |
|
275 | 274 |
|
... | ... |
@@ -406,7 +405,7 @@ int t_retransmit_reply( struct sip_msg* p_msg ) |
406 | 405 |
/* if no transaction exists or no reply to be resend -> out */ |
407 | 406 |
if ( T && T->inbound_response ) |
408 | 407 |
{ |
409 |
- udp_send( T->inbound_response->buffer , T->inbound_response->bufflen , &(T->inbound_response->to) , sizeof(struct sockaddr_in) ); |
|
408 |
+ udp_send( T->inbound_response->buffer , T->inbound_response->bufflen , (struct sockaddr*)&(T->inbound_response->to) , sizeof(struct sockaddr_in) ); |
|
410 | 409 |
return 0; |
411 | 410 |
} |
412 | 411 |
|
... | ... |
@@ -689,7 +688,7 @@ int push_reply_from_uac_to_uas( struct sip_msg *p_msg , unsigned int branch ) |
689 | 688 |
} |
690 | 689 |
|
691 | 690 |
/* */ |
692 |
- buf = build_buf_from_sip_response ( p_msg, &len); |
|
691 |
+ buf = build_res_buf_from_sip_res ( p_msg, &len); |
|
693 | 692 |
if (!buf) |
694 | 693 |
return -1; |
695 | 694 |
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 | 706 |
|
708 | 707 |
|
709 | 708 |
|
709 |
+/* |
|
710 |
+ */ |
|
711 |
+int t_cancel_branch(unsigned int branch) |
|
712 |
+{ |
|
713 |
+ LOG(L_ERR, "ERROR: t_cancel_branch: NOT IMPLEMENTED YET\n"); |
|
714 |
+} |
|
715 |
+ |
|
716 |
+ |
|
717 |
+ |
|
718 |
+ |
|
710 | 719 |
/* Builds an ACK request based on an INVITE request. ACK is send |
711 | 720 |
* to same address |
712 | 721 |
*/ |
... | ... |
@@ -769,7 +778,7 @@ int t_build_and_send_ACK( struct cell *Trans, unsigned int branch) |
769 | 778 |
*(p++) = '\n'; |
770 | 779 |
|
771 | 780 |
/* 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) ); |
|
781 |
+ udp_send( ack_buf, p-ack_buf, (struct sockaddr*)&(T->outbound_request[branch]->to) , sizeof(struct sockaddr_in) ); |
|
773 | 782 |
|
774 | 783 |
/* free mem*/ |
775 | 784 |
free( ack_buf ); |
... | ... |
@@ -856,3 +865,4 @@ void delete_handler( void *attr) |
856 | 865 |
add_to_tail_of_timer_list( hash_table, &(p_cell->tl[DELETE_LIST]), DELETE_LIST, DEL_TIME_OUT ); |
857 | 866 |
} |
858 | 867 |
|
868 |
+ |
... | ... |
@@ -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 |
|