presence crap

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6048 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-10-24 23:20:47 +00:00
parent 5b3f19fb30
commit a93ddbd212
8 changed files with 200 additions and 116 deletions
+14 -15
View File
@@ -199,22 +199,21 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(char *to, char *from, char *he
SWITCH_DECLARE(const char *) switch_stristr(const char *str, const char *instr)
{
switch_size_t score = strlen(str), x = 0;
const char *a = str, *b = instr, *p = NULL;
while(*a && *b) {
if (tolower(*b) == tolower(*a)) {
if (++x == score) {
return b - x + 1;
}
a++;
} else {
a = str;
p = b+1;
switch_size_t score = strlen(str), x = 0;
const char *a = str, *b = instr, *p = NULL;
while(*a && *b) {
if (tolower(*b) == tolower(*a)) {
if (++x == score) {
return b - x + 1;
}
a++;
} else {
a = str;
p = b+1;
x = 0;
}
b++;
}
}
b++;
}
return NULL;
}