fix infinite loop on powerpc - fgetc()

fgetc() returns int, not char.
Reported by Slava Yamont.
fix size of supervision_frame_[]
copy cnt_total_received in the same way as cnt_total_sent

Reported by Slava Yamont.