1UPSCLI_DISCONNECT(3) Network UPS Tools (NUT) UPSCLI_DISCONNECT(3)
2
3
4
6 upscli_disconnect - disconnect from a UPS server
7
9 #include <upsclient.h>
10
11 int upscli_disconnect(UPSCONN *ups);
12
14 The upscli_disconnect() function takes the pointer ups to a UPSCONN
15 state structure, shuts down the connection to the server, and frees
16 dynamic memory used by the state structure. The UPSCONN structure is
17 no longer valid after this function is called.
18
19 This function must be called, or your program will leak memory and file
20 descriptors.
21
23 The upscli_disconnect() function returns 0 on success, or -1 if an
24 error occurs.
25
27 upscli_connect(3), upscli_fd(3), upscli_strerror(3), upscli_upserror(3)
28
29
30
31 Sun Oct 6 2002 UPSCLI_DISCONNECT(3)