automerge commit

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Automerge Script
2007-07-06 16:27:34 +00:00
parent badfa8a03e
commit ff0b4e97a1
3 changed files with 11 additions and 3 deletions

View File

@@ -1340,7 +1340,7 @@ static struct ast_channel *agent_request(const char *type, int format, void *dat
#if 0
ast_log(LOG_NOTICE, "Time now: %ld, Time of lastdisc: %ld\n", tv.tv_sec, p->lastdisc.tv_sec);
#endif
if (!p->lastdisc.tv_sec || (tv.tv_sec > p->lastdisc.tv_sec)) {
if (!p->lastdisc.tv_sec || (tv.tv_sec >= p->lastdisc.tv_sec)) {
p->lastdisc = ast_tv(0, 0);
/* Agent must be registered, but not have any active call, and not be in a waiting state */
if (!p->owner && p->chan) {

View File

@@ -11782,8 +11782,12 @@ static void *do_monitor(void *data)
sip_do_reload();
/* Change the I/O fd of our UDP socket */
if (sipsock > -1)
sipsock_read_id = ast_io_change(io, sipsock_read_id, sipsock, NULL, 0, NULL);
if (sipsock > -1) {
if (sipsock_read_id)
sipsock_read_id = ast_io_change(io, sipsock_read_id, sipsock, NULL, 0, NULL);
else
sipsock_read_id = ast_io_add(io, sipsock, sipsock_read, AST_IO_IN, NULL);
}
}
/* Check for interfaces needing to be killed */
ast_mutex_lock(&iflock);

View File

@@ -103,6 +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 '\\'");
res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
@@ -249,6 +251,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 '\\'");
res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);