Displaying 13 results from an estimated 13 matches for "upscli_connect".
2011 Jun 28
3
Changes to upscli_connect
Hello,
I am currently working on the nut scanner. For detecting available upsd
on the network, I rely on upscli_connect. The problem with this function
is that it calls a blocking "connect" function. So the nut-scanner is
blocked while waiting for the TCP timeout when trying to connect to an
IP without upsd available . Since this timeout may be rather long (3
minutes on my host), I would like to add a time...
2007 Jan 13
3
Default NUT PORT
In my latest patch, I hardcoded the port NUT uses for TCP communication
(3493). The reason is, that I can't figure out a way how to change the
numeric value of the #define'd PORT into a character string. Using
snprintf() and a temporary buffer just seems wrong, since this should be
handled by the preprocessor, rather than at runtime.
The following files are affected:
- server/conf.c (line
2008 Jan 26
1
Memory leak in upsmon
Hello,
I was running upsmon some time without UPS connected and noticed
significant memory leak.
After some debugging I found the leak source. It is in file clients/upsclient.c.
Function upscli_connect() allocates memory for ups->pc_ctx and in case
of any error, just returns -1 without freeing it.
My NUT version is 2.2.0, but I quickly looked through 2.2.1 sources
and it seems this bug was not fixed.
So I include here simple patch. It uses goto to skip to free()
allocated memory before return...
2007 Jan 14
1
upscli_splitname() for upsc_list (was: Re: Default NUT PORT)
On 1/13/07, Peter Selinger <selinger@mathstat.dal.ca> wrote:
> > The question is when exactly this should be converted to a number.
> > Should this be done in upscli_splitname() or in upscli_connect()? The
> > latter would require a change in the prototypes of upscli_splitname()
> > and upscli_connect(), and an attendant change in all the existing
> > clients. When changing the "port" argument to a string, the API should
> > also define whether this is alloca...
2007 Jan 06
3
Re: [nut-commits] svn commit r708 - in trunk: . clients server
With the Ipv6 patch (r708), I get:
upsclient.c: In function `upscli_connect':
upsclient.c:469: `AI_ADDRCONFIG' undeclared (first use in this function)
upsclient.c:469: (Each undeclared identifier is reported only once
upsclient.c:469: for each function it appears in.)
Even if it doesn't break IPv4 support, it may break portability, as
IPv6 seems to require spe...
2014 Jun 03
2
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
...uda/nut-master/docs/man'
Using existing upsclient.3 manual page, since 'asciidoc' was not found.
Using existing upscli_add_host_cert.3 manual page, since 'asciidoc' was not found.
Using existing upscli_cleanup.3 manual page, since 'asciidoc' was not found.
Using existing upscli_connect.3 manual page, since 'asciidoc' was not found.
Using existing upscli_disconnect.3 manual page, since 'asciidoc' was not found.
Using existing upscli_fd.3 manual page, since 'asciidoc' was not found.
Using existing upscli_get.3 manual page, since 'asciidoc' was not fo...
2014 Jun 03
0
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
...man'
> Using existing upsclient.3 manual page, since 'asciidoc' was not found.
> Using existing upscli_add_host_cert.3 manual page, since 'asciidoc' was not found.
> Using existing upscli_cleanup.3 manual page, since 'asciidoc' was not found.
> Using existing upscli_connect.3 manual page, since 'asciidoc' was not found.
> Using existing upscli_disconnect.3 manual page, since 'asciidoc' was not found.
> Using existing upscli_fd.3 manual page, since 'asciidoc' was not found.
> Using existing upscli_get.3 manual page, since 'asciidoc&...
2011 Jun 28
1
[nut-commits] svn commit r3060 - branches/nut-scanner/tools/nut-scanner
2011/6/27 Frederic BOHE <fbohe-guest at alioth.debian.org>
> Author: fbohe-guest
> Date: Mon Jun 27 13:56:51 2011
> New Revision: 3060
> URL: http://trac.networkupstools.org/projects/nut/changeset/3060
>
> Log:
> Add NUT server scan.
>
> (...)
> device_t * scan_snmp(char * start_ip, char * stop_ip,long usec_timeout,
> snmp_security_t * sec);
>
>
2014 Jun 01
0
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
On May 24, 2014, at 5:49 PM, Stefan Bruda wrote:
>> Don't worry about the battery physical properties for now - the
>> problem there is that we don't have enough information from the UPS
>> to do a proper calculation. With the V_interval[] settings, you can
>> tweak the new state-of-charge calculation to match what you see via
>> upsc when the battery is
2014 May 24
3
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
Hello,
At 09:24 -0400 on 2014-5-23 Charles Lepple wrote:
>
> See attached. Still doesn't have the writable V_interval values,
> but I probably won't have time to test that until later.
Thank you for the patch.
> Don't worry about the battery physical properties for now - the
> problem there is that we don't have enough information from the UPS
> to do a
2007 Jan 04
2
Re: [nut-Patches][303751] Checking UPS Temperature
...changes based on nut-2.0.0).
>
> Eric Wilde
>
>
> --- upsmon.h.orig 2004-03-08 07:09:28.000000000 -0500
> +++ upsmon.h 2006-08-11 13:38:03.000000000 -0400
> @@ -29,4 +29,5 @@
> /* was ST_FIRST 0x080 */
> #define ST_CONNECTED 0x100 /* upscli_connect returned OK */
> +#define ST_OVERTEMP 0x200 /* UPS is running overtemp */ //EW
>
> /* required contents of flag file */
> @@ -72,4 +73,5 @@
> #define NOTIFY_NOCOMM 8 /* UPS hasn't been contacted in awhile */
> #define NOTIFY_NOPARENT 9 /* privileged parent process died...
2007 Jan 06
1
Re: [nut-commits] svn commit r710 - in trunk: . clients server
...upsclient.c Sat Jan 6 19:39:08 2007
> @@ -38,9 +38,6 @@
> #define shutdown_how 2
> #endif
>
> -/* From IPv6 patch (doesn't seem to be used)
> -extern int opt_af;
> - */
> struct {
> int flags;
> const char *str;
> @@ -424,8 +421,13 @@
>
> int upscli_connect(UPSCONN *ups, const char *host, int port, int flags)
> {
> +#ifndef HAVE_IPV6
> + struct sockaddr_in local, server;
> + struct hostent *serv;
> +#else
> struct addrinfo hints, *r, *rtmp;
> char *service;
> +#endif
>
> /* clear out any lingering junk */
>...
2007 Jan 23
2
Re: [nut-commits] svn commit r731
...7,6 +27,7 @@
> #include <unistd.h>
> #include <sys/socket.h>
> #include <netinet/in.h>
> +#include <arpa/inet.h>
>
> #include "upsclient.h"
>
> @@ -418,15 +419,15 @@
> }
>
> #endif /* HAVE_SSL */
> -
> +
> int upscli_connect(UPSCONN *ups, const char *host, int port, int flags)
> {
> #ifndef HAVE_IPV6
> - struct sockaddr_in local, server;
> - struct hostent *serv;
> + struct sockaddr_in local, server;
> + struct hostent *serv;
> #else
> - struct addrinfo hints, *r, *rtmp;
> - char *service...