|
@@ -6,10 +6,9 @@ unsigned int global_msg_id;
|
|
|
struct s_table* hash_table;
|
|
|
int sock_fd;
|
|
|
|
|
|
-int t_cancel_branch(unsigned int branch)
|
|
|
-{
|
|
|
- LOG(L_ERR, "ERROR: t_cancel_branch: NOT IMPLEMENTED YET\n");
|
|
|
-}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
int tm_startup()
|
|
|
{
|
|
@@ -254,7 +253,7 @@ int t_forward( struct sip_msg* p_msg , unsigned int dest_ip_param , unsigned int
|
|
|
T->outbound_request[0]->to.sin_port = htonl( dest_port ) ;
|
|
|
T->outbound_request[0]->to.sin_addr.s_addr = ntohl( dest_ip ) ;
|
|
|
|
|
|
- buf = build_buf_from_sip_request ( p_msg, &len);
|
|
|
+ buf = build_req_buf_from_sip_req ( p_msg, &len);
|
|
|
if (!buf)
|
|
|
return -1;
|
|
|
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
|
|
|
T->outbound_request[0]->max_retrans = (T->inbound_request->first_line.u.request.method_value==METHOD_INVITE) ? MAX_INVITE_RETR : MAX_NON_INVITE_RETR;
|
|
|
T->outbound_request[0]->timeout = RETR_T1;
|
|
|
/* send the request */
|
|
|
- udp_send( T->outbound_request[0]->buffer , T->outbound_request[0]->bufflen , &(T->outbound_request[0]->to) , sizeof(struct sockaddr_in) );
|
|
|
+ udp_send( T->outbound_request[0]->buffer , T->outbound_request[0]->bufflen , (struct sockaddr*)&(T->outbound_request[0]->to) , sizeof(struct sockaddr_in) );
|
|
|
}
|
|
|
|
|
|
|
|
@@ -406,7 +405,7 @@ int t_retransmit_reply( struct sip_msg* p_msg )
|
|
|
/* if no transaction exists or no reply to be resend -> out */
|
|
|
if ( T && T->inbound_response )
|
|
|
{
|
|
|
- udp_send( T->inbound_response->buffer , T->inbound_response->bufflen , &(T->inbound_response->to) , sizeof(struct sockaddr_in) );
|
|
|
+ udp_send( T->inbound_response->buffer , T->inbound_response->bufflen , (struct sockaddr*)&(T->inbound_response->to) , sizeof(struct sockaddr_in) );
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -689,7 +688,7 @@ int push_reply_from_uac_to_uas( struct sip_msg *p_msg , unsigned int branch )
|
|
|
}
|
|
|
|
|
|
/* */
|
|
|
- buf = build_buf_from_sip_response ( p_msg, &len);
|
|
|
+ buf = build_res_buf_from_sip_res ( p_msg, &len);
|
|
|
if (!buf)
|
|
|
return -1;
|
|
|
T->inbound_response->bufflen = len ;
|
|
@@ -707,6 +706,16 @@ int push_reply_from_uac_to_uas( struct sip_msg *p_msg , unsigned int branch )
|
|
|
|
|
|
|
|
|
|
|
|
+/*
|
|
|
+ */
|
|
|
+int t_cancel_branch(unsigned int branch)
|
|
|
+{
|
|
|
+ LOG(L_ERR, "ERROR: t_cancel_branch: NOT IMPLEMENTED YET\n");
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/* Builds an ACK request based on an INVITE request. ACK is send
|
|
|
* to same address
|
|
|
*/
|
|
@@ -769,7 +778,7 @@ int t_build_and_send_ACK( struct cell *Trans, unsigned int branch)
|
|
|
*(p++) = '\n';
|
|
|
|
|
|
/* sends the ACK message to the same destination as the INVITE */
|
|
|
- udp_send( ack_buf, p-ack_buf, &(T->outbound_request[branch]->to) , sizeof(struct sockaddr_in) );
|
|
|
+ udp_send( ack_buf, p-ack_buf, (struct sockaddr*)&(T->outbound_request[branch]->to) , sizeof(struct sockaddr_in) );
|
|
|
|
|
|
/* free mem*/
|
|
|
free( ack_buf );
|
|
@@ -856,3 +865,4 @@ void delete_handler( void *attr)
|
|
|
add_to_tail_of_timer_list( hash_table, &(p_cell->tl[DELETE_LIST]), DELETE_LIST, DEL_TIME_OUT );
|
|
|
}
|
|
|
|
|
|
+
|