On Jun 28, 2011, at 4:51 AM, Frédéric Bohé wrote:

I propose to add a upscli_tryconnect function accepting a timeout
parameter, which will be the copy of the current upscli_connect + the
management of the timeout. The upscli_connect will be only a wrapper on
top of upscli_tryconnect, calling it without timeout.
Please let me know if this makes sense to you.

SOCK_NONBLOCK is non-portable - you can use fcntl to set O_NONBLOCK on the socket after creating it, but before connecting.

You will also want to increment the libupsclient version number at the end of clients/Makefile.am due to the additional function:

http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info

Other than that, it sounds good to me.
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsdev

Reply via email to