diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-02-21 21:46:27 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-02-21 21:46:27 +0000 |
commit | 782bc207d5697f539beb1fd3359ce81d22e26a54 (patch) | |
tree | e473884aedc815bb2878d4fa96823fabfaa194ee /plugins | |
parent | 82d729563fcb40498248248f05829d22ba58dd2d (diff) | |
download | monitoring-plugins-782bc207d5697f539beb1fd3359ce81d22e26a54.tar.gz |
Strip leading spaces on dns return value (689563 - Simon L Nielsen)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@350 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_dns.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c index c0ea2982..19649f50 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -132,7 +132,11 @@ main (int argc, char **argv) printf ("%s\n", input_buffer); if ((temp_buffer = index (input_buffer, ':'))) { - address = strscpy (address, temp_buffer + 2); + temp_buffer++; + /* Strip leading spaces */ + for (; *temp_buffer != '\0' && *temp_buffer == ' '; temp_buffer++) + /* NOOP */; + address = strscpy (address, temp_buffer); strip (address); result = STATE_OK; } |