[Nut-upsdev] Default NUT PORT
Arjen de Korte
nut+devel at de-korte.org
Sat Jan 13 21:46:46 CET 2007
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 205)
- server/upsd.c (line 1024)
Best regards, Arjen
PS I don't want to use a numeric value, since the ports can also be set
through their service name (if we use getaddrinfo(), which is neat).
More information about the Nut-upsdev
mailing list