The patches looks mostly good to me, I just don't know why was the port variable changed from long to int?
There are two different format strings used for port in the function buf_to_addr_port_list
buf_to_addr_port_list
250 251 if (port < 0 || port > 65535) { 252 PLUGIN_DEBUG(("Illegal port number [%ld], assuming " 253 "default.\n", port)); 254 port = 0; 255 }
and
271 } 272 273 PLUGIN_DEBUG(("Found [%s][%d].\n", addr_str, port)); 274 275 l[c].addr = strdup(addr_str);
And It was changed to int because it's enough for range port < 0 || port > 65535. In another words, there was a compile time warning :-)
int
port < 0 || port > 65535
OK, but since the port is converted from string using strtol, wouldn't it be better to use long as it was and use the long int conversion in the DEBUG macros? IIRC on most platforms int == long, so maybe this is academic, but for me it would also feel more natural to use long for the output of strtol.
rebased onto 3569f360c6ec101d50720704d6214d196e60611a
That's valid argument. I fixed that.
Unfortunately the patches don't apply anymore, can you rebase?
rebased onto 2ca9cb611cfcd0dfe1ab3d8f1cff23df2cfa7006
Done
ACK
Commit 9680ac9c fixes this pull-request
Pull-Request has been merged by fidencio
Commit aefdf703 fixes this pull-request
Commit 09dc1d9d fixes this pull-request
Commit 276f2e34 fixes this pull-request
Commit 86de91f9 fixes this pull-request
master: 86de91f 276f2e3 09dc1d9 aefdf70 9680ac9