sync with 1.2 branch

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@74320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Russell Bryant 18 years ago
parent 9419406541
commit bb95ee53b0

@ -318,7 +318,7 @@ static char *descrip_vm =
" message. The units are whole-number decibels (dB).\n"
" s - Skip the playback of instructions for leaving a message to the\n"
" calling party.\n"
" u - Play the 'unavailable greeting.\n"
" u - Play the 'unavailable' greeting.\n"
" j - Jump to priority n+101 if the mailbox is not found or some other\n"
" error occurs.\n";

@ -103,7 +103,8 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl
newval = va_arg(aq, const char *);
}
va_end(aq);
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ESCAPE '\\'");
if (strcasestr(sql, "LIKE"))
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ESCAPE '\\'");
res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
@ -251,7 +252,8 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char *
if (initfield)
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ORDER BY %s", initfield);
va_end(aq);
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ESCAPE '\\'");
if (strcasestr(sql, "LIKE"))
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ESCAPE '\\'");
res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {

Loading…
Cancel
Save