* Convert a URI into socket_info */
| 129 | * Convert a URI into socket_info |
| 130 | */ |
| 131 | static inline const struct socket_info *uri2sock(struct sip_msg* msg, str *uri, |
| 132 | union sockaddr_union *to_su, int proto) |
| 133 | { |
| 134 | const struct socket_info* send_sock; |
| 135 | |
| 136 | if ( (proto=uri2su(uri, to_su, proto))==-1 ) |
| 137 | return 0; |
| 138 | |
| 139 | send_sock = get_send_socket(msg, to_su, proto); |
| 140 | if (!send_sock) { |
| 141 | LM_ERR("no corresponding socket for af %d\n", to_su->s.sa_family); |
| 142 | ser_error = E_NO_SOCKET; |
| 143 | } |
| 144 | |
| 145 | return send_sock; |
| 146 | } |
| 147 | |
| 148 | |
| 149 | #endif /* _TM_UT_H */ |
no test coverage detected