Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 169564 Details for
Bug 243384
nagios-plugins-1.4.13-r1: check_ups never logs out
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix check_ups closing the connection uncleanly
nagios-plugins-1.4.13-upslogout.patch (text/plain), 922 bytes, created by
Nick Loeve
on 2008-10-23 13:15:40 UTC
(
hide
)
Description:
Fix check_ups closing the connection uncleanly
Filename:
MIME Type:
Creator:
Nick Loeve
Created:
2008-10-23 13:15:40 UTC
Size:
922 bytes
patch
obsolete
>--- plugins/check_ups.c.orig 2008-10-23 14:19:36.000000000 +0200 >+++ plugins/check_ups.c 2008-10-23 14:49:18.000000000 +0200 >@@ -397,13 +397,13 @@ > /* char command[MAX_INPUT_BUFFER]; */ > char temp_buffer[MAX_INPUT_BUFFER]; > char send_buffer[MAX_INPUT_BUFFER]; >- char *ptr; >+ char *ptr, *end = NULL; > int len; > > *buf=0; > > /* create the command string to send to the UPS daemon */ >- sprintf (send_buffer, "GET VAR %s %s\n", ups_name, varname); >+ sprintf (send_buffer, "GET VAR %s %s\nLOGOUT\n", ups_name, varname); > > /* send the command to the daemon and get a response back */ > if (process_tcp_request >@@ -414,8 +414,11 @@ > } > > ptr = temp_buffer; >+ end = strchr(ptr, '\n'); >+ if (end) >+ *end = 0; > len = strlen(ptr); >- if (len > 0 && ptr[len-1] == '\n') ptr[len-1]=0; >+ > if (strcmp (ptr, "ERR UNKNOWN-UPS") == 0) { > printf (_("CRITICAL - no such ups '%s' on that host\n"), ups_name); > return ERROR;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 243384
: 169564