From: Anthony Minessale Date: Fri, 25 Mar 2011 21:30:16 +0000 (-0500) Subject: revert 4f6d888152febb9b8c28854192d13fd6e7228b1d X-Git-Tag: v1.2-rc1~120^2~5^2~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e4957c0b311bb840aebc4458760eb093adc1ee0;p=thirdparty%2Ffreeswitch.git revert 4f6d888152febb9b8c28854192d13fd6e7228b1d --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 9a52d79a93..93e0588b11 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -3497,12 +3497,12 @@ static void select_from_profile(sofia_profile_t *profile, if (exclude_contact) { sql = switch_mprintf("select contact, profile_name, '%q' " - "from sip_registrations where (sip_user='%q' or sip_username='%q') and (sip_host='%q' or presence_hosts like '%%%q%%') " - "and contact not like '%%%s%%'", (concat != NULL) ? concat : "", user, user, domain, domain, exclude_contact); + "from sip_registrations where sip_user='%q' and (sip_host='%q' or presence_hosts like '%%%q%%') " + "and contact not like '%%%s%%'", (concat != NULL) ? concat : "", user, domain, domain, exclude_contact); } else { sql = switch_mprintf("select contact, profile_name, '%q' " - "from sip_registrations where (sip_user='%q' or sip_username='%q') and (sip_host='%q' or presence_hosts like '%%%q%%')", - (concat != NULL) ? concat : "", user, user, domain, domain); + "from sip_registrations where sip_user='%q' and (sip_host='%q' or presence_hosts like '%%%q%%')", + (concat != NULL) ? concat : "", user, domain, domain); } switch_assert(sql);