From f50b79e782d5ff97c75ab97dda5503e08e1e2d26 Mon Sep 17 00:00:00 2001 From: Guillem Jover <gjover@sipwise.com> Date: Wed, 9 Oct 2019 18:30:16 +0200 Subject: [PATCH] TT#68300 Set default values for most options We should set sane defaults for almost all values. This will make it possible to execute even when the configuration file is not present. Change-Id: If85a72ad2b1470bdc9791e59810b4ba483becb9c --- lib/NGCP/API/Client.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/NGCP/API/Client.pm b/lib/NGCP/API/Client.pm index 157d210..97f9855 100644 --- a/lib/NGCP/API/Client.pm +++ b/lib/NGCP/API/Client.pm @@ -20,9 +20,9 @@ sub _load_config_defaults { or croak("Cannot read $cfg_file: $ERRNO"); Readonly my $config => { - host => $cfg->{_}->{NGCP_API_IP}, - port => $cfg->{_}->{NGCP_API_PORT}, - iface => $cfg->{_}->{NGCP_API_IFACE}, + host => $cfg->{_}->{NGCP_API_IP} // '127.0.0.1', + port => $cfg->{_}->{NGCP_API_PORT} // 80, + iface => $cfg->{_}->{NGCP_API_IFACE} // 'lo', sslverify => $cfg->{_}->{NGCP_API_SSLVERIFY} // 'yes', sslverify_lb => $cfg->{_}->{NGCP_API_SSLVERIFY_LOOPBACK} // 'no', read_timeout => $cfg->{_}->{NGCP_API_READ_TIMEOUT} // 180,