]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
cel_odbc & res_config_odbc: Add support for SQL_DATETIME field type
authorKevin Harwell <kharwell@sangoma.com>
Mon, 6 Jun 2022 20:09:44 +0000 (15:09 -0500)
committerJoshua Colp <jcolp@sangoma.com>
Mon, 11 Jul 2022 09:13:30 +0000 (04:13 -0500)
See also: ASTERISK_30023

ASTERISK-30096 #close
patches:
  inline on issue - submitted by Morvai Szabolcs

Change-Id: I79c0b74862100acd9c8319dca5cc456a654d02eb

cel/cel_odbc.c
res/res_config_odbc.c

index 12f4a0618d3578c10f3f3f3bb26c350236880ae2..f73eece70ac1115c0e6ff660aecb7378f24c8e77 100644 (file)
@@ -606,6 +606,7 @@ static void odbc_log(struct ast_event *event)
                                        break;
                                case SQL_TYPE_TIMESTAMP:
                                case SQL_TIMESTAMP:
+                               case SQL_DATETIME:
                                        if (ast_strlen_zero(colptr)) {
                                                continue;
                                        } else {
index 178a4837a9cba5784505488dbaa04d197ed83d2f..b6a878a8537148b4d53d101620c1016fe1735d11 100644 (file)
@@ -1133,6 +1133,7 @@ static int require_odbc(const char *database, const char *table, va_list ap)
                                        break;
                                case SQL_TYPE_TIMESTAMP:
                                case SQL_TIMESTAMP:
+                               case SQL_DATETIME:
                                        if (type != RQ_DATE && type != RQ_DATETIME) {
                                                warn_type(col, type);
                                        }