Hi all,

Thanks for the work to consolidate SER modules for Kamailio 4.0. This has been a great improvement!

When I run kamdbctl dbuid (added in http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=1fd2b4ec865cbe738d92e72259fed27380d252ab) when using PostgreSQL as database engine, I get the following error:

~# kamdbctl dbuid
/usr/sbin/kamdbctl: line 464: dbuid_create: not found

I tested this on Kamailio 4.0.1, but it seems that the issue exists in the latest git as well. The attached patch causes kamdbctl dbuid to successfully create the uid tables.


Hope this helps,

-elactrum
diff --git a/utils/kamctl/kamdbctl.pgsql b/utils/kamctl/kamdbctl.pgsql
index 4a0fe7a..ae39f62 100644
--- a/utils/kamctl/kamdbctl.pgsql
+++ b/utils/kamctl/kamdbctl.pgsql
@@ -246,3 +246,24 @@ done
 
 minfo "Extra tables succesfully created."
 }  # end extra_create
+
+
+dbuid_create () # pars: <database name>
+{
+	if [ $# -ne 1 ] ; then
+		merr "dbuid_create function takes one param"
+		exit 1
+	fi
+
+	minfo "creating uid tables into $1 ..."
+
+	for TABLE in $DBUID_MODULES; do
+		mdbg "Creating uid table: $TABLE"
+		sql_query $1 < $DB_SCHEMA/$TABLE-create.sql
+		if [ $? -ne 0 ] ; then
+			merr "Creating uid tables failed at $TABLE!"
+			exit 1
+			fi
+		done
+	minfo "UID tables succesfully created."
+}  # end uid_create
_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to