[sr-dev] git:master: lib/srdb1/schema: use &ip_addr_len; entity in address and lcr_gw schema

admin at sip-router.org admin at sip-router.org
Sun Oct 28 13:35:27 CET 2012


Module: sip-router
Branch: master
Commit: dba0691a98a329be489d83dfc1cd9560419bc35e
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dba0691a98a329be489d83dfc1cd9560419bc35e

Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at tutpro.com>
Date:   Sun Oct 28 14:32:36 2012 +0200

lib/srdb1/schema: use &ip_addr_len; entity in address and lcr_gw schema

---

 lib/srdb1/schema/address.xml                  |    4 ++--
 lib/srdb1/schema/lcr_gw.xml                   |    4 ++--
 modules/lcr/lcr_mod.c                         |    2 +-
 modules_k/permissions/address.c               |    2 +-
 utils/kamctl/db_berkeley/kamailio/version     |    4 ++--
 utils/kamctl/db_sqlite/lcr-create.sql         |    4 ++--
 utils/kamctl/db_sqlite/permissions-create.sql |    4 ++--
 utils/kamctl/dbtext/kamailio/version          |    4 ++--
 utils/kamctl/mysql/lcr-create.sql             |    4 ++--
 utils/kamctl/mysql/permissions-create.sql     |    4 ++--
 utils/kamctl/oracle/lcr-create.sql            |    4 ++--
 utils/kamctl/oracle/permissions-create.sql    |    4 ++--
 utils/kamctl/postgres/lcr-create.sql          |    4 ++--
 utils/kamctl/postgres/permissions-create.sql  |    4 ++--
 14 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/lib/srdb1/schema/address.xml b/lib/srdb1/schema/address.xml
index be380ee..d757f1a 100644
--- a/lib/srdb1/schema/address.xml
+++ b/lib/srdb1/schema/address.xml
@@ -9,7 +9,7 @@
 
 <table id="address" xmlns:db="http://docbook.org/ns/docbook">
     <name>address</name>
-    <version>5</version>
+    <version>6</version>
     <type db="mysql">&MYSQL_TABLE_TYPE;</type>
     <description>
         <db:para>This table is used by the permissions module. More information is available at: &KAMAILIO_MOD_DOC;permissions.html
@@ -38,7 +38,7 @@
     <column>
         <name>ip_addr</name>
         <type>string</type>
-        <size>48</size>
+        <size>&ip_add_len;</size>
         <description>IP address</description>
     </column>
 
diff --git a/lib/srdb1/schema/lcr_gw.xml b/lib/srdb1/schema/lcr_gw.xml
index 3c9513b..cb8a8c0 100644
--- a/lib/srdb1/schema/lcr_gw.xml
+++ b/lib/srdb1/schema/lcr_gw.xml
@@ -10,7 +10,7 @@
 
 <table id="lcr_gw" xmlns:db="http://docbook.org/ns/docbook">
     <name>lcr_gw</name>
-    <version>2</version>
+    <version>3</version>
     <type db="mysql">&MYSQL_TABLE_TYPE;</type>
     <description>
         <db:para>This table is used by lcr (Least Cost Routing) module
@@ -46,7 +46,7 @@
     <column id="ip_addr">
         <name>ip_addr</name>
         <type>string</type>
-        <size>47</size>
+        <size>&ip_add_len;</size>
         <null/>
         <description>IPv4 or IPv6 Address of the gateway</description>
     </column>
diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c
index 6574229..757734d 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -91,7 +91,7 @@ MODULE_VERSION
  */
 #define LCR_RULE_TABLE_VERSION 2
 #define LCR_RULE_TARGET_TABLE_VERSION 1
-#define LCR_GW_TABLE_VERSION 2
+#define LCR_GW_TABLE_VERSION 3
 
 /* database defaults */
 
diff --git a/modules_k/permissions/address.c b/modules_k/permissions/address.c
index 3279310..5dbe547 100644
--- a/modules_k/permissions/address.c
+++ b/modules_k/permissions/address.c
@@ -44,7 +44,7 @@
 #include "../../ut.h"
 #include "../../resolve.h"
 
-#define TABLE_VERSION 5
+#define TABLE_VERSION 6
 
 struct addr_list ***addr_hash_table; /* Ptr to current hash table ptr */
 struct addr_list **addr_hash_table_1;     /* Pointer to hash table 1 */
diff --git a/utils/kamctl/db_berkeley/kamailio/version b/utils/kamctl/db_berkeley/kamailio/version
index 4d0e5ee..61f4be3 100644
--- a/utils/kamctl/db_berkeley/kamailio/version
+++ b/utils/kamctl/db_berkeley/kamailio/version
@@ -13,7 +13,7 @@ acc|4
 active_watchers|
 active_watchers|11
 address|
-address|5
+address|6
 aliases|
 aliases|6
 carrier_name|
@@ -61,7 +61,7 @@ imc_members|1
 imc_rooms|
 imc_rooms|1
 lcr_gw|
-lcr_gw|2
+lcr_gw|3
 lcr_rule|
 lcr_rule|2
 lcr_rule_target|
diff --git a/utils/kamctl/db_sqlite/lcr-create.sql b/utils/kamctl/db_sqlite/lcr-create.sql
index 63eb37d..b660922 100644
--- a/utils/kamctl/db_sqlite/lcr-create.sql
+++ b/utils/kamctl/db_sqlite/lcr-create.sql
@@ -1,9 +1,9 @@
-INSERT INTO version (table_name, table_version) values ('lcr_gw','2');
+INSERT INTO version (table_name, table_version) values ('lcr_gw','3');
 CREATE TABLE lcr_gw (
     id INTEGER PRIMARY KEY NOT NULL,
     lcr_id SMALLINT NOT NULL,
     gw_name VARCHAR(128),
-    ip_addr VARCHAR(47),
+    ip_addr VARCHAR(50),
     hostname VARCHAR(64),
     port SMALLINT,
     params VARCHAR(64),
diff --git a/utils/kamctl/db_sqlite/permissions-create.sql b/utils/kamctl/db_sqlite/permissions-create.sql
index e0c3f59..0875431 100644
--- a/utils/kamctl/db_sqlite/permissions-create.sql
+++ b/utils/kamctl/db_sqlite/permissions-create.sql
@@ -9,11 +9,11 @@ CREATE TABLE trusted (
 
 CREATE INDEX trusted_peer_idx ON trusted (src_ip);
 
-INSERT INTO version (table_name, table_version) values ('address','5');
+INSERT INTO version (table_name, table_version) values ('address','6');
 CREATE TABLE address (
     id INTEGER PRIMARY KEY NOT NULL,
     grp INTEGER DEFAULT 1 NOT NULL,
-    ip_addr VARCHAR(48) NOT NULL,
+    ip_addr VARCHAR(50) NOT NULL,
     mask INTEGER DEFAULT 32 NOT NULL,
     port SMALLINT DEFAULT 0 NOT NULL,
     tag VARCHAR(64)
diff --git a/utils/kamctl/dbtext/kamailio/version b/utils/kamctl/dbtext/kamailio/version
index 996c37f..b362eef 100644
--- a/utils/kamctl/dbtext/kamailio/version
+++ b/utils/kamctl/dbtext/kamailio/version
@@ -1,7 +1,7 @@
 table_name(string) table_version(int) 
 acc:4
 active_watchers:11
-address:5
+address:6
 aliases:6
 carrier_name:1
 carrierfailureroute:2
@@ -25,7 +25,7 @@ grp:2
 htable:2
 imc_members:1
 imc_rooms:1
-lcr_gw:2
+lcr_gw:3
 lcr_rule:2
 lcr_rule_target:1
 location:6
diff --git a/utils/kamctl/mysql/lcr-create.sql b/utils/kamctl/mysql/lcr-create.sql
index efa65b2..f6e2037 100644
--- a/utils/kamctl/mysql/lcr-create.sql
+++ b/utils/kamctl/mysql/lcr-create.sql
@@ -1,9 +1,9 @@
-INSERT INTO version (table_name, table_version) values ('lcr_gw','2');
+INSERT INTO version (table_name, table_version) values ('lcr_gw','3');
 CREATE TABLE lcr_gw (
     id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     lcr_id SMALLINT UNSIGNED NOT NULL,
     gw_name VARCHAR(128),
-    ip_addr VARCHAR(47),
+    ip_addr VARCHAR(50),
     hostname VARCHAR(64),
     port SMALLINT UNSIGNED,
     params VARCHAR(64),
diff --git a/utils/kamctl/mysql/permissions-create.sql b/utils/kamctl/mysql/permissions-create.sql
index 660ac6f..dfa158c 100644
--- a/utils/kamctl/mysql/permissions-create.sql
+++ b/utils/kamctl/mysql/permissions-create.sql
@@ -9,11 +9,11 @@ CREATE TABLE trusted (
 
 CREATE INDEX peer_idx ON trusted (src_ip);
 
-INSERT INTO version (table_name, table_version) values ('address','5');
+INSERT INTO version (table_name, table_version) values ('address','6');
 CREATE TABLE address (
     id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     grp INT(11) UNSIGNED DEFAULT 1 NOT NULL,
-    ip_addr VARCHAR(48) NOT NULL,
+    ip_addr VARCHAR(50) NOT NULL,
     mask INT DEFAULT 32 NOT NULL,
     port SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL,
     tag VARCHAR(64)
diff --git a/utils/kamctl/oracle/lcr-create.sql b/utils/kamctl/oracle/lcr-create.sql
index 5fe88a0..8c022d8 100644
--- a/utils/kamctl/oracle/lcr-create.sql
+++ b/utils/kamctl/oracle/lcr-create.sql
@@ -1,9 +1,9 @@
-INSERT INTO version (table_name, table_version) values ('lcr_gw','2');
+INSERT INTO version (table_name, table_version) values ('lcr_gw','3');
 CREATE TABLE lcr_gw (
     id NUMBER(10) PRIMARY KEY,
     lcr_id NUMBER(5),
     gw_name VARCHAR2(128),
-    ip_addr VARCHAR2(47),
+    ip_addr VARCHAR2(50),
     hostname VARCHAR2(64),
     port NUMBER(5),
     params VARCHAR2(64),
diff --git a/utils/kamctl/oracle/permissions-create.sql b/utils/kamctl/oracle/permissions-create.sql
index 6b934cc..32ccb22 100644
--- a/utils/kamctl/oracle/permissions-create.sql
+++ b/utils/kamctl/oracle/permissions-create.sql
@@ -17,11 +17,11 @@ BEGIN map2users('trusted'); END;
 /
 CREATE INDEX trusted_peer_idx  ON trusted (src_ip);
 
-INSERT INTO version (table_name, table_version) values ('address','5');
+INSERT INTO version (table_name, table_version) values ('address','6');
 CREATE TABLE address (
     id NUMBER(10) PRIMARY KEY,
     grp NUMBER(10) DEFAULT 1 NOT NULL,
-    ip_addr VARCHAR2(48),
+    ip_addr VARCHAR2(50),
     mask NUMBER(10) DEFAULT 32 NOT NULL,
     port NUMBER(5) DEFAULT 0 NOT NULL,
     tag VARCHAR2(64)
diff --git a/utils/kamctl/postgres/lcr-create.sql b/utils/kamctl/postgres/lcr-create.sql
index 958213a..655d116 100644
--- a/utils/kamctl/postgres/lcr-create.sql
+++ b/utils/kamctl/postgres/lcr-create.sql
@@ -1,9 +1,9 @@
-INSERT INTO version (table_name, table_version) values ('lcr_gw','2');
+INSERT INTO version (table_name, table_version) values ('lcr_gw','3');
 CREATE TABLE lcr_gw (
     id SERIAL PRIMARY KEY NOT NULL,
     lcr_id SMALLINT NOT NULL,
     gw_name VARCHAR(128),
-    ip_addr VARCHAR(47),
+    ip_addr VARCHAR(50),
     hostname VARCHAR(64),
     port SMALLINT,
     params VARCHAR(64),
diff --git a/utils/kamctl/postgres/permissions-create.sql b/utils/kamctl/postgres/permissions-create.sql
index 9e48623..95f13de 100644
--- a/utils/kamctl/postgres/permissions-create.sql
+++ b/utils/kamctl/postgres/permissions-create.sql
@@ -9,11 +9,11 @@ CREATE TABLE trusted (
 
 CREATE INDEX trusted_peer_idx ON trusted (src_ip);
 
-INSERT INTO version (table_name, table_version) values ('address','5');
+INSERT INTO version (table_name, table_version) values ('address','6');
 CREATE TABLE address (
     id SERIAL PRIMARY KEY NOT NULL,
     grp INTEGER DEFAULT 1 NOT NULL,
-    ip_addr VARCHAR(48) NOT NULL,
+    ip_addr VARCHAR(50) NOT NULL,
     mask INTEGER DEFAULT 32 NOT NULL,
     port SMALLINT DEFAULT 0 NOT NULL,
     tag VARCHAR(64)




More information about the sr-dev mailing list