run expand_vars if input contains a special escaped character not just when it contains a variable to eat up back slashes

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13015 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-04-14 15:24:30 +00:00
parent 59b3cdc2a6
commit 21538b2bf9
5 changed files with 16 additions and 3 deletions
+13
View File
@@ -87,7 +87,20 @@ static inline switch_bool_t switch_is_moh(const char *s)
}
static inline int switch_string_has_escaped_data(const char *in)
{
const char *i = strchr(in, '\\');
while (i && *i == '\\') {
i++;
if (*i == '\\' || *i == 'n' || *i == 's' || *i == 't') {
return 1;
}
i = strchr(i, '\\');
}
return 0;
}
SWITCH_DECLARE(switch_status_t) switch_b64_encode(unsigned char *in, switch_size_t ilen, unsigned char *out, switch_size_t olen);
SWITCH_DECLARE(switch_size_t) switch_b64_decode(char *in, char *out, switch_size_t olen);