1UPSCLI_DISCONNECT(3)              NUT Manual              UPSCLI_DISCONNECT(3)
2
3
4

NAME

6       upscli_disconnect - disconnect from a UPS server
7

SYNOPSIS

9       #include <upsclient.h>
10
11       int upscli_disconnect(UPSCONN_t *ups);
12

DESCRIPTION

14       The upscli_disconnect() function takes the pointer ups to a UPSCONN_t
15       state structure, shuts down the connection to the server, and frees
16       dynamic memory used by the state structure. The UPSCONN_t 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

RETURN VALUE

23       The upscli_disconnect() function returns 0 on success, or -1 if an
24       error occurs.
25

SEE ALSO

27       upscli_connect(3), upscli_fd(3), upscli_strerror(3), upscli_upserror(3)
28
29
30
31Network UPS Tools                 09/15/2011              UPSCLI_DISCONNECT(3)
Impressum