1
.TH UPSCLI_DISCONNECT 3 "Sun Oct 6 2002" "" "Network UPS Tools (NUT)"
3
upscli_disconnect \- disconnect from a UPS server
6
.B #include <upsclient.h>
8
.BI "int upscli_disconnect(UPSCONN *ups);"
11
The \fBupscli_disconnect()\fP function takes the pointer \fIups\fP to a
12
UPSCONN state structure, shuts down the connection to the server, and
13
frees dynamic memory used by the state structure. The UPSCONN structure
14
is no longer valid after this function is called.
16
This function must be called, or your program will leak memory and
19
The \fBupscli_disconnect()\fP function returns 0 on success, or -1 if an
22
.BR upscli_connect "(3), " upscli_fd "(3), "
23
.BR upscli_strerror "(3), "upscli_upserror "(3) "