summaryrefslogtreecommitdiff
path: root/pjlib
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2012-11-07 04:56:26 +0000
committerNanang Izzuddin <nanang@teluu.com>2012-11-07 04:56:26 +0000
commit14072c029c6aa2fae365ee6031db742510e9e57b (patch)
treefd0ae0529a9db1b06c5e155ce6d4ecd325e67261 /pjlib
parentb0d6da05e35bc899706df0cbb790ef9fb70b42ec (diff)
Re #1556: Fixed hash key case insensitive comparison. This is reported to cause CANCEL request will be responded with 481 (Transaction does not exist) when the Via branch is not started with magic cookie (old SIP RFC), thanks Marcus Froeschl for the report.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4296 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r--pjlib/src/pj/hash.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/pjlib/src/pj/hash.c b/pjlib/src/pj/hash.c
index 7ad339be..7bce8b6e 100644
--- a/pjlib/src/pj/hash.c
+++ b/pjlib/src/pj/hash.c
@@ -178,17 +178,12 @@ static pj_hash_entry **find_entry( pj_pool_t *pool, pj_hash_table_t *ht,
entry;
p_entry = &entry->next, entry = *p_entry)
{
- pj_str_t str;
-
- if (lower) {
- str.ptr = (char *)entry->key;
- str.slen = keylen;
- }
if (entry->hash==hash && entry->keylen==keylen &&
- ((lower && pj_strnicmp2(&str, (const char *)key, keylen)==0) ||
+ ((lower && pj_ansi_strnicmp((const char*)entry->key,
+ (const char*)key, keylen)==0) ||
(!lower && pj_memcmp(entry->key, key, keylen)==0)))
{
- break;
+ break;
}
}