openv / vcontrold

:fire: vcontrold Daemon for control and logging of Viessmann® type heating devices
https://github.com/openv/openv/wiki
GNU General Public License v3.0
101 stars 54 forks source link

vclient <ip:port> not accepted anymore #58

Closed fb22 closed 4 years ago

fb22 commented 4 years ago

Since version 0.98.8:

$ vclient -h 127.0.0.1:3002 -c getSystemTime -v Host: 127.0.0.1:3002 Port: 3002 [2308] Mon Jan 6 22:51:16 2020 : Error in getaddrinfo: 127.0.0.1:3002:Name or service not known

Possibly this issue is introduced with commit #52. No issue when omitting port in host ip or using -h 127.0.0.1 -p 3002.

hmueller01 commented 4 years ago

I just checked the code. ip:port is only evaluated if port is 0. @leifnel , #52 sets the default port to 3002, so this code gets ignored. I think we should always check for ip:port and throw an error if ip:port and -p is specified. Comments?

speters commented 4 years ago

Pushed fix to v0.98.9