Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#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)

oscam.diff (984 bytes ) - added by CeekayOne 13 years ago.
oscam.c and oscam-reader.c patch

Download all attachments as: .zip

Change History (10)

comment:1 by blaky, 13 years ago

yes i can confirm, its only a cosmetic problem

comment:2 by CeekayOne, 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 CeekayOne, 13 years ago

Resolution: fixed
Status: newclosed

I just cecked and found this fixed in latest revision (maybe earlier). THX

comment:4 by CeekayOne, 13 years ago

Resolution: fixed
Status: closedreopened

Sorry, checked wrong files. It is still wrong, but I made a diff against rev 4320 for you to use.

by CeekayOne, 13 years ago

Attachment: oscam.diff added

oscam.c and oscam-reader.c patch

comment:5 by alno, 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)

in reply to:  5 comment:6 by CeekayOne, 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?

comment:7 by alno, 13 years ago

Please check Rev 4462 whether it is the right order now

comment:8 by Deas, 13 years ago

Resolution: fixed
Status: reopenedclosed

comment:9 by CeekayOne, 13 years ago

I can confirm this as fixed on DBox2 with rev4487, thx.

Note: See TracTickets for help on using tickets.