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

Function uri2su

modules/tm/ut.h:106–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104
105
106static inline int uri2su(str *uri, union sockaddr_union *to_su, int proto)
107{
108 struct proxy_l *proxy;
109
110 proxy = uri2proxy(uri, proto);
111 if (!proxy) {
112 ser_error = E_BAD_ADDRESS;
113 LM_ERR("failed create a dst proxy\n");
114 return -1;
115 }
116
117 hostent2su(to_su, &proxy->host, proxy->addr_idx,
118 (proxy->port) ? proxy->port : SIP_PORT);
119 proto = proxy->proto;
120
121 free_proxy(proxy);
122 pkg_free(proxy);
123 return proto;
124}
125
126
127

Callers 1

uri2sockFunction · 0.85

Calls 3

uri2proxyFunction · 0.85
hostent2suFunction · 0.85
free_proxyFunction · 0.85

Tested by

no test coverage detected