Added function sipreg_laddr() (#67)

This commit is contained in:
Richard Aas 2017-06-30 09:51:31 +02:00 committed by Alfred E. Heggestad
parent 9ca4ebb078
commit b08fc20a28
2 changed files with 15 additions and 0 deletions

View file

@ -13,3 +13,5 @@ int sipreg_register(struct sipreg **regp, struct sip *sip, const char *reg_uri,
int regid, sip_auth_h *authh, void *aarg, bool aref,
sip_resp_h *resph, void *arg,
const char *params, const char *fmt, ...);
const struct sa *sipreg_laddr(const struct sipreg *reg);

View file

@ -392,3 +392,16 @@ int sipreg_register(struct sipreg **regp, struct sip *sip, const char *reg_uri,
return err;
}
/**
* Get the local socket address for a SIP Registration client
*
* @param reg SIP Registration client
*
* @return Local socket address
*/
const struct sa *sipreg_laddr(const struct sipreg *reg)
{
return reg ? &reg->laddr : NULL;
}