diff --git a/src/apcupsd.cc b/src/apcupsd.cc index 84ccb52f..ba9991d5 100644 --- a/src/apcupsd.cc +++ b/src/apcupsd.cc @@ -258,7 +258,7 @@ int apcupsd_scan_arg(const char *arg) if (sscanf(arg, "%63s %d", host, &port) != 2) return 1; - apcupsd.port = htons(port); + apcupsd.port = port; strncpy(apcupsd.host, host, sizeof(apcupsd.host)); return 0; }