summaryrefslogtreecommitdiff
path: root/src/account.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2014-11-01 22:04:34 +0100
committerAlfred E. Heggestad <aeh@db.org>2014-11-01 22:04:34 +0100
commit0d11889082d7ce823a2965f75ac896c27d62ae25 (patch)
tree6cca9551c8d58b1fabd60c866fcc5c71334136ca /src/account.c
parent0a240e73793d84423285930a682984359e725c75 (diff)
presence/options patch from Juha
most of this work was done by Juha Heinanen, and reviewed by me. thanks! - menu: add support for sending SIP OPTIONS requests to any peer, using the 'o' command - presence: add support for PUBLISH, set ;pubint=N to activate - ua: add Allow/Supported header to OPTIONS reply add MESSAGE to allowed methods
Diffstat (limited to 'src/account.c')
-rw-r--r--src/account.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/account.c b/src/account.c
index fed2b00..0269b04 100644
--- a/src/account.c
+++ b/src/account.c
@@ -279,6 +279,9 @@ static int sip_params_decode(struct account *acc, const struct sip_addr *aor)
acc->regint = REG_INTERVAL + (rand_u32()&0xff);
err |= param_u32(&acc->regint, &aor->params, "regint");
+ acc->pubint = 0;
+ err |= param_u32(&acc->pubint, &aor->params, "pubint");
+
err |= param_dstr(&acc->regq, &aor->params, "regq");
for (i=0; i<ARRAY_SIZE(acc->outbound); i++) {
@@ -510,6 +513,12 @@ uint32_t account_regint(const struct account *acc)
}
+uint32_t account_pubint(const struct account *acc)
+{
+ return acc ? acc->pubint : 0;
+}
+
+
static const char *answermode_str(enum answermode mode)
{
switch (mode) {