Skip to content

gbox module ecm debug string error - FIX code included

= Revision 11577

= Issue Description Using gbox protocol the last byte is missing from the odd CW in the ecm debug string

= When the issue occurs every ecm

= How the issue is reproducable use gbox protocol as a client

(gbox) -> decrypted data (45 bytes) from xxx.xxx.xx.xx:
(gbox)   48 44 5A 4C 88 71 05 02 C4 B3 8E BF 11 09 00 00 
(gbox)   00 00 00 00 00 00 D7 94 F7 62 60 8C 3A **26** 00 00 
(gbox)   00 00 09 63 01 00 00 D2 3D 05 81 00 00 
(gbox) -> CW data from peer: 0XXX data: 48445A4C88710502C4B38EBF11090000000000000000 D794F762608C3A**26** 000000000963010000
(gbox) -> CW (->1) received cw: 0000000000000000  D794F762608C3A**__** from CW-source-peer=0XXX, caid=0963, slot= 1, ecm_pid=0502, sid=C4B3, crc=00000000, cw-src-type=5, cw-dist=1, hw-type=8, rev=0.0, chid=0000

This can be fixed by changing the code in module.gbox.c at line 1173 to

	char tmp[33];
	cs_log_dbg(D_READER,"-> CW (->%d) received cw: %s from CW-source-peer=%04X, caid=%04X, slot= %d, ecm_pid=%04X, sid=%04X, crc=%08X, cw-src-type=%d, cw-dist=%d, hw-type=%d, rev=%01X.%01X, chid=%04X", data[42] & 0x0f,
			cs_hexdump(0, dcw, 16, tmp, sizeof(tmp)), data[10] << 8 | data[11], data[34] << 8 | data[35], data[36], data[6] << 8 | data[7],
			data[8] << 8 | data[9], crc, data[41], data[42] & 0x0f, data[42] >> 4, data[43] >> 4,
			data[43] & 0x0f, data[37] << 8 | data[38]);

Please add to trunk. Thanks 007.4