ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/WinXPFAQPoll/Poller.cpp
(Generate patch)

Comparing trunk/WinXPFAQPoll/Poller.cpp (file contents):
Revision 229 by douglas, 2003-07-23T19:09:16-07:00 vs.
Revision 230 by douglas, 2003-08-05T19:01:05-07:00

# Line 264 | Line 264 | void Poller::ballots()
264                  + " FAQ | Poll\"");
265  
266          search.ignore(9);
267 <        search.peek();
267 >
268 >        while (!isdigit(search.peek()) && search.good())
269 >        {
270 >                search.get();
271 >        }
272  
273          while (search.good())
274          {
# Line 275 | Line 279 | void Poller::ballots()
279                  messages.push(message);
280  
281                  search.get();
282 <                search.peek();
282 >
283 >                while (!isdigit(search.peek()) && search.good())
284 >                {
285 >                        search.get();
286 >                }
287          }
288  
289          if (!messages.empty())
# Line 309 | Line 317 | void Poller::ballot(unsigned message)
317          number << message;
318  
319          stringstream buffer;
320 +        string junk;
321  
322          buffer << session->fetch(number.str() + " BODY.PEEK[2]");
323  
324 +        if (session->successful() && buffer.str() == "* " + number.str() + " FETCH"
325 +                + " (BODY[2] \"\")\n")
326 +        {
327 +                do
328 +                {
329 +                        getline(buffer, junk);
330 +                }
331 +                while (buffer.good());
332 +
333 +                buffer.clear();
334 +
335 +                buffer << session->fetch(number.str() + " BODY.PEEK[TEXT]");
336 +
337 +                for (unsigned index = 0; index < 25; index++)
338 +                {
339 +                        getline(buffer, junk);
340 +                }
341 +        }
342 +
343          if (session->successful() && session->fetch(number.str() + " FLAGS").find(
344                  "\\Deleted") == string::npos)
345          {
346 <                buffer.ignore(string::npos, '\n');
346 >                getline(buffer, junk);
347  
348                  bool approved = session->fetch(number.str() + " FLAGS").find("\\Flagge"
349                          + string("d")) != string::npos;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines