summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-09-04 15:02:46 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-09-04 15:02:46 +0200
commit411f5dbf811c1b2c4fedc3070af828bcfbe3ec9a (patch)
treeffbeb0f0767513c0b6ace4c4ce42be0b2c009bab /src
parent8abcfeb1486a093a07360c63ea65958e3daaa57d (diff)
remove ua_prm(), use ua_account() instead
Diffstat (limited to 'src')
-rw-r--r--src/call.c6
-rw-r--r--src/core.h1
-rw-r--r--src/reg.c2
-rw-r--r--src/sipreq.c2
-rw-r--r--src/stream.c2
-rw-r--r--src/ua.c6
6 files changed, 10 insertions, 9 deletions
diff --git a/src/call.c b/src/call.c
index c3bea22..5e0b73f 100644
--- a/src/call.c
+++ b/src/call.c
@@ -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)
{
diff --git a/src/core.h b/src/core.h
index f4ec68a..422b1ce 100644
--- a/src/core.h
+++ b/src/core.h
@@ -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);
/*
diff --git a/src/reg.c b/src/reg.c
index b206ed8..a8e53fb 100644
--- a/src/reg.c
+++ b/src/reg.c
@@ -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] ? &params[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);
diff --git a/src/ua.c b/src/ua.c
index e6287fd..2b99255 100644
--- a/src/ua.c
+++ b/src/ua.c
@@ -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;