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/check_dns.c | |
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/check_dns.c')
-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) | |||
132 | printf ("%s\n", input_buffer); | 132 | printf ("%s\n", input_buffer); |
133 | 133 | ||
134 | if ((temp_buffer = index (input_buffer, ':'))) { | 134 | if ((temp_buffer = index (input_buffer, ':'))) { |
135 | address = strscpy (address, temp_buffer + 2); | 135 | temp_buffer++; |
136 | /* Strip leading spaces */ | ||
137 | for (; *temp_buffer != '\0' && *temp_buffer == ' '; temp_buffer++) | ||
138 | /* NOOP */; | ||
139 | address = strscpy (address, temp_buffer); | ||
136 | strip (address); | 140 | strip (address); |
137 | result = STATE_OK; | 141 | result = STATE_OK; |
138 | } | 142 | } |