[Nut-upsuser] Tripp Lite OMNI1000 LCD issues
John Darrah
xyllyx at gmail.com
Tue Apr 22 04:45:27 UTC 2008
On Mon, Apr 21, 2008 at 09:36:07AM +0200, Arjen de Korte wrote:
> John Darrah wrote:
>> I have determined that the the socket is never created because the program
>> never reaches dstate_init().
>
> It *must* reach this, otherwise it would never reach the part where it
> continuously loops through upsdrv_updateinfo().
>
> [...]
>
>> The following is a section of upsdrv_initups() that i places printf's and
>> noted that it never makes it to the second one shown below. Is stdout being
>> closed somewhere?
>
> Yes, but only when running in not running in debug mode. Please run the
> driver with debug level '-DD' (not higher!) and post the *full* output
> of the first 30 seconds after that here.
>
Attached is approx 30 sec of output from the following command:
# /usr/src/nut-2.2.1/drivers/usbhid-ups -u root -DD -a trippy > poop.out 2>&1
No extra code or printf's are in the the above exec.
Note that "dstate_init: sock..." does not appear in the output.
FYI: In one test, add the following to dstate_init... It's almost as if
it is not even being called???
void dstate_init(const char *prog, const char *port)
{
char sockname[SMALLBUF];
fprintf(stderr, "@@@2 i made it here!\n"); <<<--- i never see this
exit(1); <<<------- this does not cause it to exit???
/* do this here for now */
signal(SIGPIPE, SIG_IGN);
fprintf(stderr, "@@@3 i made it here!\n");
if (port != NULL)
snprintf(sockname, sizeof(sockname), "%s/%s-%s",
dflt_statepath(), prog, port);
else
snprintf(sockname, sizeof(sockname), "%s/%s",
dflt_statepath(), prog);
sockfd = open_sock(sockname);
upsdebugx(2, "dstate_init: sock %s open on fd %d", sockname, sockfd); <<<--- not in the debug output???
}
--
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usbhid.out.gz
Type: application/octet-stream
Size: 5533 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20080421/686c4287/attachment-0001.obj
More information about the Nut-upsuser
mailing list