This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22741 )
Change subject: StatsD_Checker: Check f_IPL4_listen result
......................................................................
StatsD_Checker: Check f_IPL4_listen result
Change-Id: Ief4e30ae92b8567dd9618064220f9f50df2d0de0
---
M library/StatsD_Checker.ttcn
1 file changed, 9 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/library/StatsD_Checker.ttcn b/library/StatsD_Checker.ttcn
index d287b74..540e479 100644
--- a/library/StatsD_Checker.ttcn
+++ b/library/StatsD_Checker.ttcn
@@ -25,6 +25,9 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+import from Misc_Helpers all;
+import from Socket_API_Definitions all;
+
import from StatsD_Types all;
import from StatsD_CodecPort all;
import from StatsD_CodecPort_CtrlFunct all;
@@ -90,6 +93,7 @@
function main(charstring statsd_host, integer statsd_port) runs on StatsD_Checker_CT {
var StatsD_ConnHdlr vc_conn;
var StatsDExpects expects;
+ var Result res;
while (not mp_enable_stats) {
log("StatsD checker disabled by modulepar");
@@ -97,7 +101,11 @@
}
map(self:STATS, system:STATS);
- StatsD_CodecPort_CtrlFunct.f_IPL4_listen(STATS, statsd_host, statsd_port, { udp := {} }, {});
+ res := StatsD_CodecPort_CtrlFunct.f_IPL4_listen(STATS, statsd_host, statsd_port, { udp := {} }, {});
+ if (not ispresent(res.connId)) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "Could not bind StatsD socket, check your configuration");
+ }
/* Connect to VTY and reset stats */
map(self:STATSVTY, system:STATSVTY);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22741
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ief4e30ae92b8567dd9618064220f9f50df2d0de0
Gerrit-Change-Number: 22741
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210208/a530e5ce/attachment.htm>