#1350 closed defect (fixed)
CCcam reader: IP adress resolved ok but displayed wrong in Log
Reported by: | CeekayOne | Owned by: | |
---|---|---|---|
Priority: | trivial | Component: | Reader |
Severity: | low | Keywords: | ip resolved wrong order |
Cc: | Sensitive: | no |
Description
Revision
4081
Issue Description
In the config for a CCcam reader (maybe others, too) you have to set an IP-adress or hostname (e.g. somehost.dyndns.org). This gets resolved ok (reader works) but the log displays the IP in wrong order.
Assuming the ip is 102.103.104.105 then the log displays 105.104.103.102. Notice that the numbers itself are ok, only the order is reverse. May be confising when trying to detect errors.
When the issue occurs
always - up to rev 4081 testet
How the issue is reproducable
set a cccam reader (maybe others) where an IP / host is needed. start oscam and look at the log
Don't know if it is a reader or a resolver problem, so I put it as reader.
No log needed here as it wouldn't show anything except already explained stuff.
Attachments (1)
Change History (10)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
I found two places, just change the following and we are done with this:
in oscam.c line 962
from
cs_log("%s: resolved ip=%d.%d.%d.%d", (char*)account->dyndns, ip[3], ip[2], ip[1], ip[0]);
to
cs_log("%s: resolved ip=%d.%d.%d.%d", (char*)account->dyndns, ip[0], ip[1], ip[2], ip[3]);
in oscam-reader.c line 179
from
cs_log("%s: resolved ip=%d.%d.%d.%d", rdr->device, ip[3], ip[2], ip[1], ip[0]);
to
cs_log("%s: resolved ip=%d.%d.%d.%d", rdr->device, ip[0], ip[1], ip[2], ip[3]);
I can't do it, so please can someone fix this? Thx
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I just cecked and found this fixed in latest revision (maybe earlier). THX
comment:4 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Sorry, checked wrong files. It is still wrong, but I made a diff against rev 4320 for you to use.
follow-up: 6 comment:5 by , 13 years ago
we have a special function in simples.c which display the right order of ip addresses. Turn it manually is the worst way. Use
char *cs_inet_ntoa(in_addr_t n)
comment:6 by , 13 years ago
Replying to alno:
we have a special function in simples.c which display the right order of ip addresses. Turn it manually is the worst way. Use
char *cs_inet_ntoa(in_addr_t n)
My patch does not turn anything in any way, no values are changed. Look closely.
It is just the wrong order 3 2 1 0 instead of 0 1 2 3 in the parameters after the text line.
Or am I totally wrong here?
yes i can confirm, its only a cosmetic problem