Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13282 )

Change subject: openvpn: Improve logging and status information
......................................................................

openvpn: Improve logging and status information

New strings are far more comprehensive to understand the current status
during (re)connect to openvpn management socket.

Change-Id: Ifd0f821ed2d237740b6d3381a7190ad7058ce889
---
M src/osysmon_openvpn.c
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osysmon_openvpn.c b/src/osysmon_openvpn.c
index 148e3b8..8c95984 100644
--- a/src/osysmon_openvpn.c
+++ b/src/osysmon_openvpn.c
@@ -117,7 +117,7 @@
 {
        struct openvpn_client *vpn = osmo_stream_cli_get_data(conn);

-       update_name(vpn->rem_cfg, "management interface unavailable");
+       update_name(vpn->rem_cfg, "disconnected from openvpn management 
socket");
        vpn->connected = false;
        talloc_free(vpn->tun_ip);
        talloc_free(vpn->rem_cfg->remote_host);
@@ -131,7 +131,7 @@
 {
        struct openvpn_client *vpn = osmo_stream_cli_get_data(conn);

-       update_name(vpn->rem_cfg, "management interface incompatible");
+       update_name(vpn->rem_cfg, "connected to openvpn management socket");
        vpn->connected = true;

        return 0;
@@ -149,7 +149,7 @@

        bytes = osmo_stream_cli_recv(conn, msg);
        if (bytes < 0)
-               OVPN_LOG(msg, vpn, "unable to receive message in callback\n");
+               OVPN_LOG(msg, vpn, "read on openvpn management socket failed 
(%d)\n", bytes);
        else
                parse_state(msg, vpn);

@@ -174,7 +174,7 @@
        if (!vpn->cfg)
                goto dealloc;

-       vpn->rem_cfg = host_cfg_alloc(vpn, "management interface unavailable", 
NULL, 0);
+       vpn->rem_cfg = host_cfg_alloc(vpn, "connecting to openvpn management 
socket", NULL, 0);
        if (!vpn->rem_cfg)
                goto dealloc;

@@ -191,7 +191,7 @@
        osmo_stream_cli_set_disconnect_cb(vpn->mgmt, disconnect_cb);

        if (osmo_stream_cli_open(vpn->mgmt) < 0) {
-               OVPN_LOG(vpn->rem_cfg, vpn, "failed to connect to management 
interface\n");
+               OVPN_LOG(vpn->rem_cfg, vpn, "failed to connect to management 
socket\n");
                goto dealloc;
        }


--
To view, visit https://gerrit.osmocom.org/13282
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd0f821ed2d237740b6d3381a7190ad7058ce889
Gerrit-Change-Number: 13282
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>

Reply via email to