Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2010, 4:28:46 PM (15 years ago)
Author:
smerkli
Message:

done for today, didn't get bug to leave, and connect doesn't quite work yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/masterserver/src/libraries/network/WANDiscovery.cc

    r7688 r7692  
    9696       * the list
    9797       */
    98       return 1;
     98      return 2;
    9999    }
    100100
    101101    /* done handling, return all ok code 0 */
    102     return 0;
     102    return 1;
    103103  }
    104104 
     
    112112
    113113    /* poll for replies */
    114     /* TODO add some timeout here so we don't wait indefinitely */
    115     while( !((this->msc).pollForReply( rhandler )) )
    116       /* nothing */;
    117 
    118     /* done receiving. */
     114    int i = WANDISC_MAXTRIES;
     115    while( i > 0 )
     116    {
     117      /* poll for reply and act according to what was received */
     118      switch( this->msc.pollForReply( rhandler ) )
     119      { case 0: /* no event occured, decrease timeout */
     120          --i; break;
     121        case 1: /* got a list element, continue */
     122          break;
     123        case 2: /* done. */
     124          i = 0; break;
     125      }
     126    }
    119127  }
    120128
Note: See TracChangeset for help on using the changeset viewer.