| 938 | } |
| 939 | |
| 940 | int init_rb( struct retr_buf *rb, struct sip_msg *msg) |
| 941 | { |
| 942 | int proto; |
| 943 | |
| 944 | proto=msg->rcv.proto; |
| 945 | |
| 946 | if (msg->msg_flags&FL_REPLY_TO_VIA) { |
| 947 | if (update_sock_struct_from_via( &(rb->dst.to), msg, msg->via1 )==-1) { |
| 948 | LM_ERR("cannot lookup reply dst: %.*s\n", |
| 949 | msg->via1->host.len, msg->via1->host.s ); |
| 950 | ser_error=E_BAD_VIA; |
| 951 | return 0; |
| 952 | } |
| 953 | } else { |
| 954 | update_sock_struct_from_ip( &rb->dst.to, msg ); |
| 955 | } |
| 956 | rb->dst.proto=proto; |
| 957 | rb->dst.proto_reserved1=msg->rcv.proto_reserved1; |
| 958 | /* use for sending replies the incoming interface of the request -bogdan */ |
| 959 | rb->dst.send_sock=msg->rcv.bind_address; |
| 960 | return 1; |
| 961 | } |
| 962 | |
| 963 | |
| 964 | static inline void init_new_t(struct cell *new_cell, struct sip_msg *p_msg) |
no test coverage detected