MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / uri2sock

Function uri2sock

modules/tm/ut.h:131–146  ·  view source on GitHub ↗

* Convert a URI into socket_info */

Source from the content-addressed store, hash-verified

129 * Convert a URI into socket_info
130 */
131static 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 */

Callers 10

send_resource_subsFunction · 0.85
src_start_recordingFunction · 0.85
b2b_sdp_demux_startFunction · 0.85
media_fork_to_uriFunction · 0.85
media_exchange_from_uriFunction · 0.85
get_hfblockFunction · 0.85
trim_to_single_contactFunction · 0.85
overwrite_req_contactsFunction · 0.85

Calls 2

uri2suFunction · 0.85
get_send_socketFunction · 0.85

Tested by

no test coverage detected