kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
October 2018
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
23 participants
274 discussions
Start a n
N
ew thread
git:master:d66fc714: db_mysql: added parameter unsigend_type
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: d66fc7146267417a7a0a0cee22a0148bf94d0b6a URL:
https://github.com/kamailio/kamailio/commit/d66fc7146267417a7a0a0cee22a0148…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2018-10-01T10:45:52+02:00 db_mysql: added parameter unsigend_type - if set to 1, then the module converts unsigned column value to DB1_UINT or DB1_UBIGINT --- Modified: src/modules/db_mysql/db_mysql.c Modified: src/modules/db_mysql/km_res.c --- Diff:
https://github.com/kamailio/kamailio/commit/d66fc7146267417a7a0a0cee22a0148…
Patch:
https://github.com/kamailio/kamailio/commit/d66fc7146267417a7a0a0cee22a0148…
--- diff --git a/src/modules/db_mysql/db_mysql.c b/src/modules/db_mysql/db_mysql.c index ebf85e35be..4a79a1878d 100644 --- a/src/modules/db_mysql/db_mysql.c +++ b/src/modules/db_mysql/db_mysql.c @@ -44,6 +44,7 @@ unsigned int my_retries = 1; /* Number of retries when command fails */ unsigned int my_server_timezone = 0; /* Use FROM_UNIXTIME() for date conversion */ unsigned long my_client_ver = 0; +int db_mysql_unsigned_type = 0; struct mysql_counters_h mysql_cnts_h; counter_def_t mysql_cnt_defs[] = { @@ -98,6 +99,7 @@ static param_export_t params[] = { {"auto_reconnect", INT_PARAM, &db_mysql_auto_reconnect}, {"insert_delayed", INT_PARAM, &db_mysql_insert_all_delayed}, {"update_affected_found", INT_PARAM, &db_mysql_update_affected_found}, + {"unsigned_type", PARAM_INT, &db_mysql_unsigned_type}, {0, 0, 0} }; diff --git a/src/modules/db_mysql/km_res.c b/src/modules/db_mysql/km_res.c index 81f24dfc99..df7b00bce7 100644 --- a/src/modules/db_mysql/km_res.c +++ b/src/modules/db_mysql/km_res.c @@ -38,6 +38,7 @@ #include "km_my_con.h" #include "km_res.h" +extern int db_mysql_unsigned_type; /*! * \brief Get and convert columns from a result @@ -96,17 +97,19 @@ int db_mysql_get_columns(const db1_con_t* _h, db1_res_t* _r) case MYSQL_TYPE_LONG: case MYSQL_TYPE_INT24: case MYSQL_TYPE_TIMESTAMP: - if (fields[col].flags & UNSIGNED_FLAG) { + if ((db_mysql_unsigned_type != 0) + && (fields[col].flags & UNSIGNED_FLAG)) { LM_DBG("use DB1_UINT result type\n"); RES_TYPES(_r)[col] = DB1_UINT; } else { LM_DBG("use DB1_INT result type\n"); - RES_TYPES(_r)[col] = DB1_UINT; + RES_TYPES(_r)[col] = DB1_INT; } break; case MYSQL_TYPE_LONGLONG: - if (fields[col].flags & UNSIGNED_FLAG) { + if ((db_mysql_unsigned_type != 0) + && (fields[col].flags & UNSIGNED_FLAG)) { LM_DBG("use DB1_UBIGINT result type\n"); RES_TYPES(_r)[col] = DB1_UBIGINT; } else {
6 years, 1 month
1
0
0
0
git:master:23907981: registrar: coherent code formatting
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 239079819d148ac41af802a8a28929a3fff0e56b URL:
https://github.com/kamailio/kamailio/commit/239079819d148ac41af802a8a28929a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2018-10-01T08:34:21+02:00 registrar: coherent code formatting --- Modified: src/modules/registrar/api.c Modified: src/modules/registrar/registrar.c --- Diff:
https://github.com/kamailio/kamailio/commit/239079819d148ac41af802a8a28929a…
Patch:
https://github.com/kamailio/kamailio/commit/239079819d148ac41af802a8a28929a…
6 years, 1 month
1
0
0
0
git:master:202f4b1a: lib/srdb1: cast types to get rid of compile warnings
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 202f4b1aeca9e8d40b8791d6de3205fa643ff9a8 URL:
https://github.com/kamailio/kamailio/commit/202f4b1aeca9e8d40b8791d6de3205f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2018-10-01T08:31:29+02:00 lib/srdb1: cast types to get rid of compile warnings --- Modified: src/lib/srdb1/db.c --- Diff:
https://github.com/kamailio/kamailio/commit/202f4b1aeca9e8d40b8791d6de3205f…
Patch:
https://github.com/kamailio/kamailio/commit/202f4b1aeca9e8d40b8791d6de3205f…
--- diff --git a/src/lib/srdb1/db.c b/src/lib/srdb1/db.c index 3e36628330..4a250bc819 100644 --- a/src/lib/srdb1/db.c +++ b/src/lib/srdb1/db.c @@ -445,14 +445,17 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab * Check the table version * 0 means ok, -1 means an error occurred */ -int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table, const unsigned int version) +int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table, + const unsigned int version) { int ver = db_table_version(dbf, dbh, table); if (ver < 0) { LM_ERR("querying version for table %.*s\n", table->len, table->s); return -1; - } else if (ver != version) { - LM_ERR("invalid version %d for table %.*s found, expected %d (check table structure and table \"version\")\n", ver, table->len, table->s, version); + } else if (ver != (int)version) { + LM_ERR("invalid version %d for table %.*s found, expected %u" + " (check table structure and table \"version\")\n", + ver, table->len, table->s, version); return -1; } return 0;
6 years, 1 month
1
0
0
0
git:master:7c64387a: lib/srdb1: handle DB1_UINT and DB1_UBIGINT for db version check
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 7c64387ab0694c9be9f502c3bca017b0235c7716 URL:
https://github.com/kamailio/kamailio/commit/7c64387ab0694c9be9f502c3bca017b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2018-10-01T08:28:38+02:00 lib/srdb1: handle DB1_UINT and DB1_UBIGINT for db version check --- Modified: src/lib/srdb1/db.c --- Diff:
https://github.com/kamailio/kamailio/commit/7c64387ab0694c9be9f502c3bca017b…
Patch:
https://github.com/kamailio/kamailio/commit/7c64387ab0694c9be9f502c3bca017b…
--- diff --git a/src/lib/srdb1/db.c b/src/lib/srdb1/db.c index 305543c931..3e36628330 100644 --- a/src/lib/srdb1/db.c +++ b/src/lib/srdb1/db.c @@ -391,9 +391,9 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab VAL_TYPE(val) = DB1_STR; VAL_NULL(val) = 0; VAL_STR(val) = *table; - + col[0] = &tmp2; - + if (dbf->query(connection, key, 0, val, col, 1, 1, 0, &res) < 0) { LM_ERR("error in db_query\n"); return -1; @@ -414,7 +414,8 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab ver = ROW_VALUES(RES_ROWS(res)); val_type = VAL_TYPE(ver); - if ( (val_type!=DB1_INT && val_type!=DB1_DOUBLE && val_type!=DB1_BIGINT) + if ( (val_type!=DB1_INT && val_type!=DB1_DOUBLE && val_type!=DB1_BIGINT + && val_type!=DB1_UINT && val_type!=DB1_UBIGINT) || VAL_NULL(ver) ) { LM_ERR("invalid type (%d) or nul (%d) version " "columns for %.*s\n", VAL_TYPE(ver), VAL_NULL(ver), @@ -425,8 +426,12 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab if (val_type == DB1_INT) { ret = VAL_INT(ver); + } else if (val_type == DB1_UINT) { + ret = (int)VAL_UINT(ver); } else if (val_type == DB1_BIGINT) { ret = (int)VAL_BIGINT(ver); + } else if (val_type == DB1_UBIGINT) { + ret = (int)VAL_UBIGINT(ver); } else if (val_type == DB1_DOUBLE) { ret = (int)VAL_DOUBLE(ver); }
6 years, 1 month
1
0
0
0
← Newer
1
...
25
26
27
28
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Results per page:
10
25
50
100
200