diff options
-rw-r--r-- | include/baresip.h | 1 | ||||
-rw-r--r-- | modules/mwi/mwi.c | 2 | ||||
-rw-r--r-- | modules/presence/notifier.c | 2 | ||||
-rw-r--r-- | modules/presence/subscriber.c | 2 | ||||
-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 |
10 files changed, 13 insertions, 13 deletions
diff --git a/include/baresip.h b/include/baresip.h index 0d6271c..bcd99c9 100644 --- a/include/baresip.h +++ b/include/baresip.h @@ -582,7 +582,6 @@ struct account *ua_account(const struct ua *ua); const char *ua_outbound(const struct ua *ua); struct call *ua_call(const struct ua *ua); struct call *ua_prev_call(const struct ua *ua); -struct account *ua_prm(const struct ua *ua); struct list *ua_calls(const struct ua *ua); enum presence_status ua_presence_status(const struct ua *ua); void ua_presence_status_set(struct ua *ua, const enum presence_status status); diff --git a/modules/mwi/mwi.c b/modules/mwi/mwi.c index 2b94131..4ce4a19 100644 --- a/modules/mwi/mwi.c +++ b/modules/mwi/mwi.c @@ -109,7 +109,7 @@ static int mwi_subscribe(struct ua *ua) NULL, ua_aor(ua), "message-summary", NULL, 600, ua_cuser(ua), routev, routev[0] ? 1 : 0, - auth_handler, ua_prm(ua), true, NULL, + auth_handler, ua_account(ua), true, NULL, notify_handler, close_handler, mwi, "Accept:" " application/simple-message-summary\r\n"); diff --git a/modules/presence/notifier.c b/modules/presence/notifier.c index 387a9bc..7fc0a67 100644 --- a/modules/presence/notifier.c +++ b/modules/presence/notifier.c @@ -130,7 +130,7 @@ static int notifier_alloc(struct notifier **notp, msg, NULL, se, 200, "OK", 600, 600, 600, ua_cuser(not->ua), "application/pidf+xml", - auth_handler, ua_prm(not->ua), true, + auth_handler, ua_account(not->ua), true, sipnot_close_handler, not, NULL); if (err) { warning("presence: sipevent_accept failed: %m\n", err); diff --git a/modules/presence/subscriber.c b/modules/presence/subscriber.c index c3dfc28..596e592 100644 --- a/modules/presence/subscriber.c +++ b/modules/presence/subscriber.c @@ -239,7 +239,7 @@ static int subscribe(struct presence *pres) err = sipevent_subscribe(&pres->sub, uag_sipevent_sock(), uri, NULL, ua_aor(ua), "presence", NULL, 600, ua_cuser(ua), routev, routev[0] ? 1 : 0, - auth_handler, ua_prm(ua), true, NULL, + auth_handler, ua_account(ua), true, NULL, notify_handler, close_handler, pres, "%H", ua_print_supported, ua); if (err) { @@ -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; |