diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/call.c | 6 | ||||
-rw-r--r-- | src/core.h | 1 | ||||
-rw-r--r-- | src/reg.c | 2 | ||||
-rw-r--r-- | src/sipreq.c | 2 | ||||
-rw-r--r-- | src/stream.c | 2 | ||||
-rw-r--r-- | src/ua.c | 6 |
6 files changed, 10 insertions, 9 deletions
@@ -1028,6 +1028,12 @@ struct ua *call_get_ua(const struct call *call) } +struct account *call_account(const struct call *call) +{ + return call ? call->acc : NULL; +} + + static int auth_handler(char **username, char **password, const char *realm, void *arg) { @@ -171,6 +171,7 @@ int call_notify_sipfrag(struct call *call, uint16_t scode, const char *reason, ...); int call_af(const struct call *call); void call_set_xrtpstat(struct call *call); +struct account *call_account(const struct call *call); /* @@ -223,7 +223,7 @@ int reg_register(struct reg *reg, const char *reg_uri, const char *params, routev[0] ? routev : NULL, routev[0] ? 1 : 0, reg->id, - sip_auth_handler, ua_prm(reg->ua), true, + sip_auth_handler, ua_account(reg->ua), true, register_handler, reg, params[0] ? ¶ms[1] : NULL, "Allow: %s\r\n", uag_allowed_methods()); diff --git a/src/sipreq.c b/src/sipreq.c index c1510b6..314f45c 100644 --- a/src/sipreq.c +++ b/src/sipreq.c @@ -136,7 +136,7 @@ int sip_req_send(struct ua *ua, const char *method, const char *uri, if (err) goto out; - err = sip_auth_alloc(&sr->auth, auth_handler, ua_prm(ua), true); + err = sip_auth_alloc(&sr->auth, auth_handler, ua_account(ua), true); if (err) goto out; diff --git a/src/stream.c b/src/stream.c index 24721d2..97e15ce 100644 --- a/src/stream.c +++ b/src/stream.c @@ -404,7 +404,7 @@ static void stream_start_keepalive(struct stream *s) if (!s) return; - rtpkeep = ua_prm(call_get_ua(s->call))->rtpkeep; + rtpkeep = call_account(s->call)->rtpkeep; s->rtpkeep = mem_deref(s->rtpkeep); @@ -1871,12 +1871,6 @@ int ua_print_supported(struct re_printf *pf, const struct ua *ua) } -struct account *ua_prm(const struct ua *ua) -{ - return ua ? ua->acc : NULL; -} - - struct list *ua_calls(const struct ua *ua) { return ua ? (struct list *)&ua->calls : NULL; |