Module: kamailio
Branch: master
Commit: 575b17d23cd5fa060f775bc56b42c735048bc849
URL: https://github.com/kamailio/kamailio/commit/575b17d23cd5fa060f775bc56b42c73…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T06:46:56+02:00
ims_ipsec_pcscf: docs updated for ipsec_forward() flags
---
Modified: src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/575b17d23cd5fa060f775bc56b42c73…
Patch: https://github.com/kamailio/kamailio/commit/575b17d23cd5fa060f775bc56b42c73…
---
diff --git a/src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml b/src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
index ff65668e6e1..ee58f16fb63 100644
--- a/src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
+++ b/src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml
@@ -284,7 +284,7 @@ ipsec_create("location", "1");
<itemizedlist>
<listitem>
<para>
- <emphasis>0x01</emphasis> (1) - set force socket for request messages. Useful for ipsec and TCP.
+ <emphasis>0x01</emphasis> (1) - set force socket for request messages. Useful for ipsec and TCP/TLS.
</para>
</listitem>
<listitem>
@@ -316,17 +316,19 @@ ipsec_create("location", "1");
</listitem>
<listitem>
<para>
- <emphasis>0x40</emphasis> (64) - use user equipment client port as target for TCP requests.
+ <emphasis>0x40</emphasis> (64) - use user equipment client port as target for TCP/TLS requests
+ (try to reuse the UE client connection).
</para>
</listitem>
<listitem>
<para>
- <emphasis>0x80</emphasis> (128) - set transport parameter in the new dst uri for TCP requests.
+ <emphasis>0x80</emphasis> (128) - set transport parameter in the new dst uri for TCP/TLS requests.
</para>
</listitem>
<listitem>
<para>
- <emphasis>0x100</emphasis> (256) - use Via attributes (port and protocol) for routing UDP reply.
+ <emphasis>0x100</emphasis> (256) - use Via attributes (port and protocol) for routing UDP reply,
+ and protocol from next hop address for request (otherwise it taken from saved contact).
</para>
</listitem>
<listitem>
- URL: https://github.com/kamailio/kamailio/commit/fb685a8bd5d5e34edde44614f313cbb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:02:09+02:00
jansson: declare variables at the beginning of blocks
(cherry picked from commit a2bff77c3f7bfee8dae90c3ef20522d480f2e14d)
- URL: https://github.com/kamailio/kamailio/commit/2758754f2bb427bff06b2a6e8217587…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Date: 2024-04-29T05:05:31+02:00
core: properly handle drop() action for kemi engines
- GH #3718
(cherry picked from commit 82593a09f8ef6d53e7e88238c057bbcdd9ab287b)
- URL: https://github.com/kamailio/kamailio/commit/4b88c5bf30054739f476388523e8d2b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:08:18+02:00
core: rthreads - init return variable
(cherry picked from commit 181c602616e13323786335e8e28f182871aa5e9b)
(cherry picked from commit 0747c18d5c4db2e7e8408ad2c7efa120ec76523e)
- URL: https://github.com/kamailio/kamailio/commit/02b877493cd6ffc6cfdf7da114d255d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:08:56+02:00
core: ppcfg - jump to end when defexp eval does not get a str val
(cherry picked from commit daac0bdb88f6f732bda7c683af45b90f87fdb7c9)
(cherry picked from commit 4c78a564c5ad8662014cf686428a37238a6d8476)
- URL: https://github.com/kamailio/kamailio/commit/cea618ede170bd02bb7ccd478a4f1a7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:09:18+02:00
core: select - handle ws and wss inside select_ip_port()
(cherry picked from commit d8e0942c9e83c8cad7c182bf41c156ba35bf24d2)
(cherry picked from commit 089bf63178039b13cde0beccfacab1536af76179)
- URL: https://github.com/kamailio/kamailio/commit/92d3b52ca4595a7e4d8ab003951191c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:09:31+02:00
core: parser rr - check for rr value before serializing
(cherry picked from commit 6ee26a3ae3293aaeb4507d5d0b16ad31173cc39a)
(cherry picked from commit 4626cb7f0e0b273153ce0004900a92553783a893)
- URL: https://github.com/kamailio/kamailio/commit/d12613c8e357a8dc882eefe2d84fedd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:10:14+02:00
ctl: reset log prefix on reading ctl traffic
- it may be previously set in process by some event route
(cherry picked from commit 5b8b2717ee2f57da932132683b27eb33cea3fd59)
(cherry picked from commit d45c78eeeaea6a9fc9dcb927436f834392d9d7c9)
- URL: https://github.com/kamailio/kamailio/commit/f225edd2fdc87b0ebf72e15d8a11255…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:12:20+02:00
acc: more log messages of failure arsing extra acc string
(cherry picked from commit 04a73ace6572dd5c95a8f50b39b2ce712f7ebe84)
(cherry picked from commit 91b0962679092f28abb5022d1505372356460f7d)
- URL: https://github.com/kamailio/kamailio/commit/c90b736a098e1d76224c1e97c2a7142…
Author: Elena-Ramona Modroiu <ramona(a)asipto.com>
Date: 2024-04-29T05:13:20+02:00
core: resolve/create_srv_pref_list() - insert at correct position in list
(cherry picked from commit f35cf8904119dcf582ea2451648de5fef095466b)
(cherry picked from commit dbf9208f3a402844c9981fb7ed09493a1338dfdd)
- URL: https://github.com/kamailio/kamailio/commit/a82d1575d9ac7820e526741fc169033…
Author: Elena-Ramona Modroiu <ramona(a)asipto.com>
Date: 2024-04-29T05:13:27+02:00
corex: fix conditions for dns_cache modparam srv attributes
(cherry picked from commit 8114b2016d032484edafe4edd04fb02d52cfd058)
(cherry picked from commit 3f44cabcfc0abc83ae1971ac74fbb0bd36829ce4)
- URL: https://github.com/kamailio/kamailio/commit/edbcfff018145372fd6fa5d1777912f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:13:56+02:00
smsops: reformat module exports structures
(cherry picked from commit 9848d43cb367d6901a0b8c727759feb8a8fad930)
(cherry picked from commit b21a7aaa467f2b76a52308557657c65274e34087)
- URL: https://github.com/kamailio/kamailio/commit/b3935051a8112b1a2152d8eb65da29b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:14:04+02:00
smsops: short reference section about variables
(cherry picked from commit 9a94930ae1168d5df79e3dc1414841cdf23a2eba)
(cherry picked from commit c0c8ee05ab25256b9154d2056ee04b07f3f2290a)
- URL: https://github.com/kamailio/kamailio/commit/f1969ecaacd47eb03ef6b54d71c7037…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:14:11+02:00
blst: reformat exported structures
(cherry picked from commit e39557c96d2f419184c826d779f1a3309acc4269)
(cherry picked from commit e394a05152b29d4009c9cb963bced72526c7651b)
- URL: https://github.com/kamailio/kamailio/commit/8bb69fd5f5911098a3e567887ad2a3a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:14:51+02:00
sdpops: reformat the codecs map
(cherry picked from commit 359a442e14a156b0bcf60dc5b2580cbc57924e34)
(cherry picked from commit 855c76780c4399d6d9881ce3c525a7df56e111c4)
- URL: https://github.com/kamailio/kamailio/commit/96ff473191bb24be90e2dde82fccb5c…
Author: vijay kumar <vijay.kumar(a)exotel.in>
Date: 2024-04-29T05:15:24+02:00
rtpengine: fix pkg mem leak in send_rtpp_command()
- freed request.s after sending request to websocket
(cherry picked from commit b4753ae4216b0c960ac094f4be8232fb4d0147b0)
(cherry picked from commit d2cf78f5c70977639f3b7f66b852350b764e4b13)
- URL: https://github.com/kamailio/kamailio/commit/550573b37b566aa46bd94a2a644e932…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Date: 2024-04-29T05:15:45+02:00
tcp_main: Add protocol argument for searching tcp/tls connections
(cherry picked from commit 4a40b16d4f9bef9bc75d3272c83878e6348aa0b8)
(cherry picked from commit 2661594bf7f31558e6ac7524f33ebb358aefce21)
- URL: https://github.com/kamailio/kamailio/commit/4ccf4c9b5134a0632f5ea5a653a6f5e…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Date: 2024-04-29T05:15:51+02:00
tcp_main: Add proto argument to tcpconn_exists function
(cherry picked from commit 6779efd430178adff0ae438d178e38c003e4e05c)
(cherry picked from commit 0c070443b585c597d2d6249ac6ac32490d9c7f48)
- URL: https://github.com/kamailio/kamailio/commit/63120ef838cbcde1f40862a745b9d31…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Date: 2024-04-29T05:16:03+02:00
tcp_main: Update comment docs
(cherry picked from commit 0a28a93c6e060081267dc686e342d45ef03358e7)
(cherry picked from commit a19e6e0e49d9881ab990d23ad31a95773fe1a00b)
- URL: https://github.com/kamailio/kamailio/commit/aff1797bb83a10868914e814702367f…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Date: 2024-04-29T05:16:10+02:00
core/forward: Match protocol when forwarding
(cherry picked from commit d81e5113884b933251499630d112ec5b1150b8a4)
(cherry picked from commit 7d103cf3887401fca32d95f7ea7ee10f28e9e127)
- URL: https://github.com/kamailio/kamailio/commit/09699ba5d4efab0cbe64869c1ed8db7…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Date: 2024-04-29T05:16:17+02:00
tcp_main: Match wss protocol
(cherry picked from commit 175d755c40bc50b78b2cf4f18ad22429289af90d)
(cherry picked from commit 3052565e3ce14d5d3c45d790877a562185085548)
- URL: https://github.com/kamailio/kamailio/commit/6ed99ae36fa16da2f0f59e3b5700abe…
Author: Rick Barenthin <rick(a)ng-voice.com>
Date: 2024-04-29T05:16:32+02:00
usrloc: check on db delete the return value of memchr
When inserting into the database the AOR is split at the @ sign and
if there is no @ sign in the AOR only the domain part is filled and the
user part is left empty.
But for deleting this is not done and the query failed to be executed
and the AOR is not deleted. This PR add this behaviour of only comparing against the
domain part if the AOR doesn't contain a @ sign.
(cherry picked from commit 49276a1f43b1a3bf4a8d681888df964000360c79)
(cherry picked from commit 28bbcd5a50f45b8217125481706180a76323dc44)
- URL: https://github.com/kamailio/kamailio/commit/a794cef754fb3f2bc59d2d6a6d060e9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:17:02+02:00
core: tcp - keep connection id on event route cb structure
(cherry picked from commit 11e7d71e5c2ee9428298658ed3b9a0f625d40f00)
(cherry picked from commit db2e96ec2aacde1bd50b65ea6357388bad39e86f)
- URL: https://github.com/kamailio/kamailio/commit/cc7c586fbd72fe132719f3cfdba4809…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:17:08+02:00
tcpops: reworked some debug messages
(cherry picked from commit 27e3b7f3f82957c6dc80f2ff89c40bdd87cecb81)
(cherry picked from commit c9fe59d6cd73179aa75e21b3b215bc0465b182aa)
- URL: https://github.com/kamailio/kamailio/commit/aeba79f5d9d5bf4fffdb64dd2c603fb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:17:14+02:00
core: tcp - set a global shortcut to tcp connection for event route
(cherry picked from commit d114d11724dc4157e7e5809504531d26da6bcc57)
(cherry picked from commit 069de99576b5f8bff002176331ed2f545afe8158)
- URL: https://github.com/kamailio/kamailio/commit/50c1b5cfe1b765b98438ac071eaa47c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:17:20+02:00
pv: use global tcp connection callback for event route on $conid
(cherry picked from commit f5c05a68ae72881ab0691bb8488112356fc67c79)
(cherry picked from commit 7e987d8937349246f2abfa041679f568344ff402)
- URL: https://github.com/kamailio/kamailio/commit/365bb5d7fd1534e467f8a2d1b120f2c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:17:30+02:00
core: fmsg - parse loopback ip when initializing faked msg structure
- GH #3817
(cherry picked from commit 66b3c04a9653425b1602c82dd2456a7eb7cf59d1)
(cherry picked from commit 794c2edeaffe059bf8de6ab1d3df5db003ed4cb0)
- URL: https://github.com/kamailio/kamailio/commit/9e270790302f075317d8b9eefce9141…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-29T05:18:01+02:00
tcpops: removed unused variable introduced recently
(cherry picked from commit fe8f052c29528b656062927626f9784b32b7c8f6)
(cherry picked from commit e76d755de6482e51c9ddac5bba3834cb58ad79b2)
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
2 issues:
**Issue 1:**
Currently statsd functions return bool: `true` or `false` depending when
the function succeeds or fails respectively.
This value gets implicitly converted to `int`: `true` -> `1`, `false` ->
`0`.
For Kamailio `1` means succesfull execution, but `0` means to stop
processing messages, which is not what we want as statsd should not impact
flow execution. Instead we want to return `-1` which signifies error,
but the flow continues.
**Issue 2:**
statsd_init executes `statsd_connect` which tries to connect to statd
server.
If connection fails then kamailio fails to start.
This is not the desired behaviour as:
1. Kamailio should continue working even if statsd server is down,
metrics should not impact runtime.
2. `statsd_connect` is also re-executed each time we try to send the metric https://github.com/salemove/kamailio/blame/master/src/modules/statsd/lib_st…,
so it's initial result is not essential.
Note, that before 5.8 the result of init was already ignored due to
implicit conversion of `false` to `0`
until after
https://github.com/kamailio/kamailio/commit/0186246fce8f0e4bb46b30c05174983…
was introduced (which could be considered a breaking change even if it
seemingly fixes a bug in conversion).
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3819
-- Commit Summary --
* modules/statsd: avoid stopping flow when sending statsd metric fails
* modules/statsd: do not fail module initilization when statsd init fails
-- File Changes --
M src/modules/statsd/statsd.c (51)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3819.patchhttps://github.com/kamailio/kamailio/pull/3819.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3819
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3819(a)github.com>
Module: kamailio
Branch: master
Commit: 5e66ba23851f115bcb88d7e3f71f78ab33fc1e30
URL: https://github.com/kamailio/kamailio/commit/5e66ba23851f115bcb88d7e3f71f78a…
Author: Ostap <ostap_mal(a)hotmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2024-04-28T23:15:28+02:00
modules/statsd: ensure statsd failures do not stop execution (#3819)
* modules/statsd: avoid stopping flow when sending statsd metric fails
Currently statsd functions return bool: `true` or `false` depending when
the function succeeds or fails respectively.
This value gets implicitly converted to `int`: `true` -> `1`, `false` ->
`0`.
For Kamailio `1` means succesfull execution, but `0` means to stop
processing messages, which is not what we want as statsd should not impact
flow execution. Instead we want to return `-1` which signifies error,
but the flow continues.
* modules/statsd: do not fail module initilization when statsd init fails
statsd_init executes `statsd_connect` which tries to connect to statd
server.
If connection fails then kamailio fails to start.
This is not the desired behaviour as:
1. Kamailio should continue working even if statsd server is down,
metrics should not impact runtime.
2. `statsd_connect` is also re-executed each time we try to send the metric https://github.com/salemove/kamailio/blame/master/src/modules/statsd/lib_st…,
so it's initial result is not essential.
Note, that before 5.8 the result of init was already ignored due to
implicit conversion of `false` to `0`
until after
https://github.com/kamailio/kamailio/commit/0186246fce8f0e4bb46b30c05174983…
was introduced (which could be considered a breaking change even if it
seemingly fixes a bug in conversion).
---
Modified: src/modules/statsd/statsd.c
---
Diff: https://github.com/kamailio/kamailio/commit/5e66ba23851f115bcb88d7e3f71f78a…
Patch: https://github.com/kamailio/kamailio/commit/5e66ba23851f115bcb88d7e3f71f78a…
#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
- add support for configuring the DB root host/port connection parameters separate from the ro/rw settings. This allows the user to authenticate over the specific socket configured (tcp/udp/unix) for each connection type (root/ro/rw).
- note that support is added for mysql and postgresql connections. no changes to the other DB engine connection parameters.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3830
-- Commit Summary --
* utils/kamctl: make root host/port configurable
-- File Changes --
M utils/kamctl/kamctlrc (8)
M utils/kamctl/kamdbctl.base (3)
M utils/kamctl/kamdbctl.mysql (23)
M utils/kamctl/kamdbctl.pgsql (10)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3830.patchhttps://github.com/kamailio/kamailio/pull/3830.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3830
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3830(a)github.com>
Module: kamailio
Branch: master
Commit: de23dc1035e4b885f45bc4150d282c26b294db64
URL: https://github.com/kamailio/kamailio/commit/de23dc1035e4b885f45bc4150d282c2…
Author: Tyler Moore <tmoore(a)goflyball.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-28T23:14:16+02:00
utils/kamctl: make root host/port configurable
- add support for configuring the DB root host/port connection
parameters separate from the ro/rw settings. This allows the
user to authenticate over the specific socket configured
(tcp/udp/unix) for each connection type (root/ro/rw).
- note that support is added for mysql and postgresql connections.
no changes to the other DB engine connection parameters.
---
Modified: utils/kamctl/kamctlrc
Modified: utils/kamctl/kamdbctl.base
Modified: utils/kamctl/kamdbctl.mysql
Modified: utils/kamctl/kamdbctl.pgsql
---
Diff: https://github.com/kamailio/kamailio/commit/de23dc1035e4b885f45bc4150d282c2…
Patch: https://github.com/kamailio/kamailio/commit/de23dc1035e4b885f45bc4150d282c2…
---
diff --git a/utils/kamctl/kamctlrc b/utils/kamctl/kamctlrc
index ce0bd9d93bc..67af483d9c6 100644
--- a/utils/kamctl/kamctlrc
+++ b/utils/kamctl/kamctlrc
@@ -44,6 +44,14 @@
## database access host (from where is kamctl used)
# DBACCESSHOST=192.168.0.1
+## database host for super user (useful for specifying a local socket or virtual hostname)
+# defaults to value of DBHOST when not set
+# DBROOTHOST="localhost"
+
+## database port for super user (on some DB specifying the port will force TCP connections)
+# default value will depend on client DB tool
+# DBROOTPORT=""
+
## database super user (for ORACLE this is 'scheme-creator' user)
# DBROOTUSER="root"
diff --git a/utils/kamctl/kamdbctl.base b/utils/kamctl/kamdbctl.base
index 4a3beccaef4..5579c9e8373 100644
--- a/utils/kamctl/kamdbctl.base
+++ b/utils/kamctl/kamdbctl.base
@@ -20,6 +20,9 @@ DBROUSER=${DBROUSER:-kamailioro}
# password for read-only user
DBROPW=${DBROPW:-kamailioro}
+# address of database server for root connections
+DBROOTHOST=${DBROOTHOST:-$DBHOST}
+
# user name column
USERCOL=${USERCOL:-username}
diff --git a/utils/kamctl/kamdbctl.mysql b/utils/kamctl/kamdbctl.mysql
index 81a730bbe65..49915dc7954 100644
--- a/utils/kamctl/kamdbctl.mysql
+++ b/utils/kamctl/kamdbctl.mysql
@@ -27,23 +27,22 @@ fi
# config vars
#################################################################
-# full privileges MySQL user
-if [ -z "$DBROOTUSER" ]; then
- DBROOTUSER="root"
-fi
-
# Set DBROOTPW in kamctlrc or via next line to set the database
# root password if you want to run this script without any user prompt.
# This is unsafe, but useful e.g. for automatic testing.
#DBROOTPW=""
-
-if [ -z "$DBPORT" ] ; then
- CMD="mysql -h $DBHOST -u$DBROOTUSER "
- DUMP_CMD="mysqldump -h $DBHOST -u$DBROOTUSER -c -t "
-else
- CMD="mysql -h $DBHOST -P $DBPORT -u$DBROOTUSER "
- DUMP_CMD="mysqldump -h $DBHOST -P $DBPORT -u$DBROOTUSER -c -t "
+# build the client base commands one param at a time
+# let the client choose defaults where not specified
+CMD="mysql -h $DBROOTHOST"
+DUMP_CMD="mysqldump -c -t -h $DBROOTHOST"
+if [ -n "$DBROOTPORT" ] ; then
+ CMD="$CMD -P $DBROOTPORT"
+ DUMP_CMD="$DUMP_CMD -P $DBROOTPORT"
+fi
+if [ -n "$DBROOTUSER" ]; then
+ CMD="$CMD -u $DBROOTUSER"
+ DUMP_CMD="mysqldump -u $DBROOTUSER"
fi
#################################################################
diff --git a/utils/kamctl/kamdbctl.pgsql b/utils/kamctl/kamdbctl.pgsql
index 1eb5d88d2b8..3b46c04294f 100644
--- a/utils/kamctl/kamdbctl.pgsql
+++ b/utils/kamctl/kamdbctl.pgsql
@@ -51,12 +51,12 @@ if [ -z "$DBROOTUSER" ]; then
fi
fi
-if [ -z "$DBPORT" ] ; then
- CMD="psql -q -h $DBHOST -U $DBROOTUSER "
- DUMP_CMD="pg_dump -h $DBHOST -U $DBROOTUSER -c"
+if [ -z "$DBROOTPORT" ] ; then
+ CMD="psql -q -h $DBROOTHOST -U $DBROOTUSER "
+ DUMP_CMD="pg_dump -h $DBROOTHOST -U $DBROOTUSER -c"
else
- CMD="psql -q -h $DBHOST -p $DBPORT -U $DBROOTUSER "
- DUMP_CMD="pg_dump -h $DBHOST -p $DBPORT -U $DBROOTUSER -c"
+ CMD="psql -q -h $DBROOTHOST -p $DBROOTPORT -U $DBROOTUSER "
+ DUMP_CMD="pg_dump -h $DBROOTHOST -p $DBROOTPORT -U $DBROOTUSER -c"
fi
#################################################################