Does the SIP grammar consider differently-cased resource identifiers to be equivalent?

On 02/18/2015 07:44 PM, Luis Azedo wrote:

Hi,

sometimes UAs do subscriptions using mixed case uris which most of the
times leads to NOTIFY messages not getting to the UA.

if used with subs_db_mode = 3 and a case insensitive dbengine it works.

however, if we use other value on subs_db_mode it doesn't work or
behaves poorly (missing cache)

should we make string insensitive matches in presence module for uris ?
i marked the 10 occurrences with >>>

Thank You

[lazedo@dev-01 presence]# grep strncmp . -R
./subscribe.c:if(ev_param->name.len== 2 && strncmp(ev_param->name.s,
"id", 2)== 0)
./utils_func.h:if(strncmp(ip.s, "sip:", 4)!=0)
./hash.c:strncmp(s->callid.s, callid.s, callid.len)==0 &&
./hash.c:strncmp(s->to_tag.s, to_tag.s, to_tag.len)==0 &&
./hash.c:strncmp(s->from_tag.s, from_tag.s, from_tag.len)== 0)
./hash.c:&& strncmp(s->to_tag.s,subs->to_tag.s,subs->to_tag.len)==0)
./hash.c:&& strncmp(s->callid.s,subs->callid.s,subs->callid.len)==0
./hash.c:&& strncmp(s->to_tag.s,subs->to_tag.s,subs->to_tag.len)==0
./hash.c:&& strncmp(s->from_tag.s,subs->from_tag.s,subs->from_tag.len)==0)
 >>> ./hash.c:if(strncmp(s->contact.s, subs->contact.s, subs->contact.len))
 >>>./hash.c:strncmp(p->pres_uri.s, pres_uri->s, pres_uri->len)== 0 )
./presence.c:(reason.s && subs.reason.s && strncmp(reason.s, subs.reason.s,
 >>>./presence.c:strncmp(s->pres_uri.s, subs->pres_uri.s,
subs->pres_uri.len)== 0 &&
 >>>./presence.c:strncmp(s->watcher_user.s, subs->watcher_user.s,
s->watcher_user.len)== 0 &&
 
>>>./presence.c:strncmp(s->watcher_domain.s,subs->watcher_domain.s,s->watcher_domain.len)==0)
./presence.c:    if ((subs.reason.len == 12) && (strncmp(subs.reason.s,
"polite-block", 12) == 0))
./presentity.c:strncmp(presentity->sender->s, sender.s, sender.len)== 0))
./event_list.c:if(sep && strncmp(sep+1, "winfo", 5)== 0)
./event_list.c:strncmp(p->name.s,ps->name.s, ps->name.len)== 0)
./event_list.c:strncmp(p->body.s,ps->body.s,ps->body.len)== 0))
./notify.c:strncmp(s->pres_uri.s, subs->pres_uri.s,subs->pres_uri.len)== 0)
 >>>./notify.c:strncmp(sender.s, contact->s, sender.len)== 0)
./notify.c:if( (etags.len == etag->len) && (strncmp(etags.s,
 >>>./notify.c:strncmp(s->pres_uri.s, pres_uri->s, pres_uri->len)== 0)) ||
 >>>./notify.c:strncmp(sender->s, s->contact.s, sender->len)== 0))
./notify.c:subs->reason.len== 12 && strncmp(subs->reason.s,
"polite-block", 12)== 0)
./notify.c:if(w->uri.len == wuri.len && strncmp(w->uri.s, wuri.s,
wuri.len)== 0)




_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev



--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States

Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to