search for: upserror

Displaying 8 results from an estimated 8 matches for "upserror".

2007 Jan 23
2
Re: [nut-commits] svn commit r731
...junk */ > @@ -437,11 +438,10 @@ > ups->syserrno = 0; > ups->upsclient_magic = UPSCLIENT_MAGIC; > > - ups->pc_ctx = malloc(sizeof(PCONF_CTX)); > - > - if (!ups->pc_ctx) { > + if ((ups->pc_ctx = malloc(sizeof(PCONF_CTX))) == NULL) > + { > ups->upserror = UPSCLI_ERR_NOMEM; > - return -1; > + return -1; > } > > pconf_init(ups->pc_ctx, NULL); > @@ -449,19 +449,27 @@ > ups->ssl_ctx = NULL; > ups->ssl = NULL; > > - if (!host) { > + if (!host) > + { > ups->upserror = UPSCLI_ERR_NOSUC...
2007 Jan 06
3
Re: [nut-commits] svn commit r708 - in trunk: . clients server
...t *serv; > + struct addrinfo hints, *r, *rtmp; > + char *service; > > /* clear out any lingering junk */ > ups->fd = -1; > @@ -449,78 +452,86 @@ > return -1; > } > > - if ((serv = gethostbyname(host)) == (struct hostent *) NULL) { > - > - ups->upserror = UPSCLI_ERR_NOSUCHHOST; > + service = malloc (sizeof (char) * 6); > + if (service == NULL) { > + ups->upserror = UPSCLI_ERR_NOMEM; > return -1; > } > > - if ((ups->fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { > - ups->upserror = UPSCLI_ERR_SOCKFAILURE;...
2007 Jan 06
1
Re: [nut-commits] svn commit r710 - in trunk: . clients server
...s, *r, *rtmp; > char *service; > +#endif > > /* clear out any lingering junk */ > ups->fd = -1; > @@ -452,6 +454,80 @@ > return -1; > } > > +#ifndef HAVE_IPV6 > + if ((serv = gethostbyname(host)) == (struct hostent *) NULL) { > + > + ups->upserror = UPSCLI_ERR_NOSUCHHOST; > + return -1; > + } > + > + if ((ups->fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { > + ups->upserror = UPSCLI_ERR_SOCKFAILURE; > + ups->syserrno = errno; > + return -1; > + } > + > + memset(&local, '\0', sizeof(stru...
2015 Oct 19
0
upsmon Poll UPS "Driver not connected" messages
...to reduce that chatter. These messages originate in pollups() in clients/upsmon.c. It looks to me like pollups() sees the utype_t->status flag ST_CONNECTED set, yet the UPSCONN_t->fd is -1, which means there is no valid connection (upscli_sendline() in clients/upsclient.c sets UPSCONN_t->upserror = UPSCLI_ERR_DRVNOTCONN). If ST_CONNECTED was clear, the connection would be retried. It appears to me that because ST_CONNECTED is set, pollups() thinks it should have a good connection and is surprised to find out it does not. Thus, it always writes the "Driver not connected" message...
2007 Jan 19
0
Re: [nut-commits] svn commit r755 - in trunk: . clients
> * are you sure you want to use fprintf(stderr, ...) in a library? > This doesn't seem like a good idea to me. Wouldn't it be more > consistent to extend upscli_errlist[] ? Errorcodes are passed in 'ups->upserror' (and 'ups->syserrno'). Uh oh, we don't have a connection to an UPS yet when we call upscli_splitname() or upscli_splitaddr(). The upscli_strerror() function that is used to return the message in upscli_errlist[] needs a pointer to a UPSCONN structure also. The upscli_errlist[] i...
2007 Jan 12
2
Makefiles driving me NUTs
I want to use upsdebugx, upslogx in 'clients/upsclient.c', however this fails with the following error messages (I trimmed the path to the build directory to <path> in order to prevent line wrapping): <path>/clients/upsclient.c:941: undefined reference to `upsdebugx' <path>/clients/upsclient.c:910: undefined reference to `upslogx'
2019 Nov 04
2
UPS not recognized
...he UPS beeperload.off - Turn off the load immediatelyload.on - Turn on the load immediatelyshutdown.return - Turn off the load and return when power is backshutdown.stayoff - Turn off the load and remain offshutdown.stop - Stop a shutdown in progress========================== root at omv:~# upsc -l upsError: Unknown error========================== USB cable disconnect and reconnect: Nov 04 13:09:09 omv kernel: usb 1-1.6: USB disconnect, device number 8Nov 04 13:09:17 omv kernel: usb 1-1.6: new low-speed USB device number 9 using ehci-pciNov 04 13:09:17 omv kernel: usb 1-1.6: New USB device found, idVe...
2019 Sep 27
3
UPS not recognized
Hello, Replaced UPS Kstar Micropower Micro 1200 (managed via blazer_usb) with https://www.njoy.ro/UPS/horus-plus-2000. The latter doesn't seem to be supported. 1. I tried blazer_usb and usbhid-ups. Any other suggestions? 2. What would be needed to get it supported by NUT? ======== HW ======== HP Microserver Gen 8 ======== UPS ======== Working:Kstar Micropower Micro