Skip to content

Commit

Permalink
Added function sipreg_laddr() (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
richaas authored and alfredh committed Jun 30, 2017
1 parent 9ca4ebb commit b08fc20
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/re_sipreg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
13 changes: 13 additions & 0 deletions src/sipreg/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit b08fc20

Please sign in to comment.