diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:51:52 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:51:52 +0000 |
commit | 722eb3c4c3cfa1c0cee915c949c5f95199ee24dd (patch) | |
tree | 25683963c5e51bdedd6211cd0ea92a85639505c3 /res/res_config_pgsql.c | |
parent | 815b5b09da5e555add7bba3d8fca588e7611248a (diff) |
Merged revisions 285710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r285710 | bbryant | 2010-09-09 14:50:13 -0400 (Thu, 09 Sep 2010) | 8 lines
Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent.
(closes issue #16903)
Reported by: Nick_Lewis
Patches:
pbx.c-specificity.patch uploaded by Nick Lewis (license 657)
Tested by: Nick_Lewis
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@285711 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_config_pgsql.c')
-rw-r--r-- | res/res_config_pgsql.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index e356e8f83..b4398e8c9 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -1179,12 +1179,16 @@ static int require_pgsql(const char *database, const char *tablename, va_list ap size, column->type); res = -1; } - } else if (strncmp(column->type, "float", 5) == 0 && !ast_rq_is_int(type) && type != RQ_FLOAT) { - ast_log(LOG_WARNING, "Column %s cannot be a %s\n", column->name, column->type); - res = -1; - } else if (strncmp(column->type, "timestamp", 9) == 0 && type != RQ_DATETIME) { - ast_log(LOG_WARNING, "Column %s cannot be a %s\n", column->name, column->type); - res = -1; + } else if (strncmp(column->type, "float", 5) == 0) { + if (!ast_rq_is_int(type) && type != RQ_FLOAT) { + ast_log(LOG_WARNING, "Column %s cannot be a %s\n", column->name, column->type); + res = -1; + } + } else if (strncmp(column->type, "timestamp", 9) == 0) { + if (type != RQ_DATETIME && type != RQ_DATE) { + ast_log(LOG_WARNING, "Column %s cannot be a %s\n", column->name, column->type); + res = -1; + } } else { /* There are other types that no module implements yet */ ast_log(LOG_WARNING, "Possibly unsupported column type '%s' on column '%s'\n", column->type, column->name); res = -1; |