From: leslie Date: Sat, 12 Sep 2009 02:03:02 +0000 (+0800) Subject: cardclient-camd: fix poll error handling (2nd) X-Git-Tag: upstream/620~172 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=88373af7999d3c77c3e800b2089877d20203650f;p=sasc-ng.git cardclient-camd: fix poll error handling (2nd) --- diff --git a/systems/cardclient/camd.c b/systems/cardclient/camd.c index d9ef6b7..d477ad2 100644 --- a/systems/cardclient/camd.c +++ b/systems/cardclient/camd.c @@ -487,8 +487,8 @@ int cCardClientCamd35::RecvBlock(struct CmdBlock *cb, int maxlen, int to) unsigned char *m=(unsigned char *)cb; int n=cCardClient::RecvMsg(m,16+UCSIZE(cb),to); if(n<=0) { - if(n<0) PRINTF(L_CC_CAMD35,"short packet received"); - return -1; + if(n<0) PRINTF(L_CC_CAMD35,"packet receive failed"); + return n; } Decrypt(m+UCSIZE(cb),16); n=cb->udp_header.len+HDSIZE(cb);