]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7217: #resolve #comment use upper when you query
authorBrian West <brian@freeswitch.org>
Fri, 30 Jan 2015 16:53:44 +0000 (10:53 -0600)
committerBrian West <brian@freeswitch.org>
Fri, 30 Jan 2015 16:53:44 +0000 (10:53 -0600)
src/mod/endpoints/mod_sofia/mod_sofia.c

index 098d7a5b3af07451a1520f74d4f83cf96d558845..9b5541404528011ee43cdc796a051a6a79641b4f 100644 (file)
@@ -3657,11 +3657,15 @@ static void select_from_profile(sofia_profile_t *profile,
 
        if (exclude_contact) {
                sql = switch_mprintf("select contact, profile_name, '%q' "
-                                                        "from sip_registrations where profile_name='%q' and sip_user='%q' and (sip_host='%q' or presence_hosts like '%%%q%%') "
+                                                        "from sip_registrations where profile_name='%q' "
+                                                        "and upper(sip_user)=upper('%q') " 
+                                                        "and (sip_host='%q' or presence_hosts like '%%%q%%') "
                                                         "and contact not like '%%%s%%'", (concat != NULL) ? concat : "", profile->name, user, domain, domain, exclude_contact);
        } else {
                sql = switch_mprintf("select contact, profile_name, '%q' "
-                                                        "from sip_registrations where profile_name='%q' and sip_user='%q' and (sip_host='%q' or presence_hosts like '%%%q%%')",
+                                                        "from sip_registrations where profile_name='%q' "
+                                                        "and upper(sip_user)=upper('%q') "
+                                                        "and (sip_host='%q' or presence_hosts like '%%%q%%')",
                                                         (concat != NULL) ? concat : "", profile->name, user, domain, domain);
        }