|
From: | Aymeric Moizard |
Subject: | Re: [osip-dev] implicit subscription |
Date: | Wed, 28 Jun 2017 14:22:31 +0200 |
hi,
sorry – my fault.
everything fine !
your patch v4 partly works.
Nevertheless I have some improvements / hardening issues; attached as v5.
here are my explanations:
- jcallback.c, function cb_rcv2xx
for performance reasons I put the handling of NOTIFY and REFER in an else-if cascade
- jcallback.c, function cb_rcv2xx
eXcall_api.c, function eXosip_call_send_answer
I re-worked the parsing a bit:
o searching for the expires-parameter did not work, due to the different length of “active” and “pending”
o you forgot to take into account the “;” between “active”/”pending” and the “expires” parameter
o the length of “expires” is 7, not 6 chars
à I added const char’s for the strings to search for; so we can use strlen to get the right length
o I did not like the double “if (ss_expires!=NULL)”
o I use “;expires=” for searching for the expires-parameter
Subscription-State = "Subscription-State" HCOLON substate-value *( SEMI subexp-params ) substate-value = "active" / "pending" / "terminated" / extension-substate
subexp-params = ("reason" EQUAL event-reason-value) / ("expires" EQUAL delta-seconds) / ("retry-after" EQUAL delta-seconds) / generic-param
I have no much doubt that SEMI and EQUAL can contains space and other LWS...
o check “sub_state->hvalue != NULL” was missing
otherwise crash in case of empty “Subscription-State” header
o check “refer_sub->hvalue != NULL” was missing
otherwise crash in case of empty “Refer-Sub” header
- Although the expires parameter should be present in the Subscription-State header of the NOTIFY
I added to use the default (excontext->implicit_subscription_expires ) in this case.
br,
Christoph
[Prev in Thread] | Current Thread | [Next in Thread] |