Hi guys,

I read from a QTcpSocket to receive yenc encoded usenet articles and save it to files, but something is wrong. Some articles have wrong CRCs while decoding (one Segment for each article and file):

Qt Code:
  1. QTcpSocket *tcpSocket;
  2. QFile output;
  3.  
  4. void Segment::socketReadyRead() {
  5. const QByteArray data = tcpSocket->readAll();
  6.  
  7. output.write(data);
  8.  
  9. if (data.contains("=yend")) {
  10. tcpSocket->close();
  11. }
  12. }
To copy to clipboard, switch view to plain text mode 

What is wrong with my code? Someone has a hint for me?

Thanks!
dynup