From: Kevin D. <kev...@us...> - 2004-03-01 01:38:05
|
Update of /cvsroot/bidwatcher/bidwatcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13459 Modified Files: Tag: STABLE_1_3 bidwatcher.cpp bidwatcher.h helpers.cpp Log Message: Temporary fix to handle the new long lines. This makes bidding/sniping work. Index: bidwatcher.cpp =================================================================== RCS file: /cvsroot/bidwatcher/bidwatcher/Attic/bidwatcher.cpp,v retrieving revision 1.171.2.24 retrieving revision 1.171.2.25 diff -u -d -r1.171.2.24 -r1.171.2.25 --- bidwatcher.cpp 15 Dec 2003 04:17:08 -0000 1.171.2.24 +++ bidwatcher.cpp 1 Mar 2004 01:27:26 -0000 1.171.2.25 @@ -644,8 +644,8 @@ showError("Network timeout error"); return; } - char lineBuff[1024]; - returnVal = ProcessBidSubmission(Buff, lineBuff); + char lineBuff[8000]; + returnVal = ProcessBidSubmission(Buff, lineBuff, 8000); memset(snipeKey, 0, sizeof(snipeKey)); Index: helpers.cpp =================================================================== RCS file: /cvsroot/bidwatcher/bidwatcher/Attic/helpers.cpp,v retrieving revision 1.90.2.17 retrieving revision 1.90.2.18 diff -u -d -r1.90.2.17 -r1.90.2.18 --- helpers.cpp 25 Feb 2004 18:48:49 -0000 1.90.2.17 +++ helpers.cpp 1 Mar 2004 01:27:27 -0000 1.90.2.18 @@ -458,7 +458,7 @@ // 4 - Other problem (unknown, probably bad connection) // ////////////////////////////////////////////////////////////////////////////////// -int ProcessBidSubmission(char *Buff, char *lineBuff) +int ProcessBidSubmission(char *Buff, char *lineBuff, int lineBuffLen) { #ifdef HAVE_SSTREAM std::istringstream streamBuff(Buff); @@ -471,7 +471,7 @@ // key in it so we can use it later. while (streamBuff) { - streamBuff.getline(lineBuff, 1024, '\n'); + streamBuff.getline(lineBuff, lineBuffLen, '\n'); if (strstr(lineBuff, "name=\"key\"")) { foundKey = TRUE; Index: bidwatcher.h =================================================================== RCS file: /cvsroot/bidwatcher/bidwatcher/Attic/bidwatcher.h,v retrieving revision 1.74.2.11 retrieving revision 1.74.2.12 diff -u -d -r1.74.2.11 -r1.74.2.12 --- bidwatcher.h 14 Dec 2003 00:55:30 -0000 1.74.2.11 +++ bidwatcher.h 1 Mar 2004 01:27:27 -0000 1.74.2.12 @@ -359,7 +359,7 @@ float calculateBidIncrement(float currentBid, char *currency); char *StripHtmlTags(const char *stringToStrip); char *StripAndTab(const char *stringToStrip); -int ProcessBidSubmission(char *Buff, char *lineBuff); +int ProcessBidSubmission(char *Buff, char *lineBuff, int lineBuffLen); int ProcessBid(char *Buff); int ParseEmailAddress(char *Buff, char *emailAddress); void encode_password(char *dest, const char *src); |