logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

upscli_set_default_connect_timeout - Configure upsclient module aspect of default timeout for initial

Description

       The upscli_set_default_connect_timeout() function assigns upsclient module internal default connection
       timeout for upscli_connect(3) from a C string which represents a floating-point non-negative number
       (invalid parsing is ignored and does not modify the previously stored value), a NULL argument value sets
       the internal timeout to 0 meaning indefinitely blocking (NUT default for this method over at least 20
       years).

       While this method can be called explicitly, it is recommended to call the
       upscli_init_default_connect_timeout(3) for consistent setting from a number of sources with different
       priority.

Name

       upscli_set_default_connect_timeout - Configure upsclient module aspect of default timeout for initial
       connections.

Return Value

       The upscli_set_default_connect_timeout() function returns 0 on success (either if the strings was NULL so
       the built-in default 0 is applied, or if its content was valid and its value got applied), or -1 if an
       error occurs (string was not NULL, and its content was not valid — not a number, negative, etc.)

See Also

upscli_connect(3), upscli_tryconnect(3), upscli_init_default_connect_timeout(3),
       upscli_get_default_connect_timeout(3)

Network UPS Tools 2.8.3                            07/08/2025                            UPSCLI_SET_DEFAULT_C(3)

Synopsis

               #include <upsclient.h>

               int upscli_set_default_connect_timeout(const char *secs);

See Also