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

Function ospGetLocalAddress

modules/osp/sipheader.c:173–187  ·  view source on GitHub ↗

* Get local egress address * param ignore1 * param ignore2 * return MODULE_RETURNCODE_TRUE success, MODULE_RETURNCODE_FALSE failure MODULE_RETURNCODE_ERROR error */

Source from the content-addressed store, hash-verified

171 * return MODULE_RETURNCODE_TRUE success, MODULE_RETURNCODE_FALSE failure MODULE_RETURNCODE_ERROR error
172 */
173int ospGetLocalAddress(
174 struct sip_msg* msg,
175 char* ignore1,
176 char* ignore2)
177{
178 osp_dest* dest;
179
180 if(msg->rcv.bind_address && msg->rcv.bind_address->address_str.s) {
181 if ((dest = ospGetLastOrigDestination())) {
182 ospCopyStrToBuffer(&msg->rcv.bind_address->address_str, dest->egress, sizeof(dest->egress));
183 }
184 }
185
186 return MODULE_RETURNCODE_TRUE;
187}
188
189/*
190 * Get display name from From header

Callers

nothing calls this directly

Calls 2

ospCopyStrToBufferFunction · 0.85

Tested by

no test coverage detected