Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2008, 4:30:15 AM (16 years ago)
Author:
landauf
Message:

removed some other (potential) bugs or dangerous code lines

Location:
code/branches/console/src/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/network/GameStateClient.cc

    r1062 r1438  
    102102          // update data and create object/entity...
    103103          if( !no->updateData(sync) && !no->create() )
     104          {
    104105            COUT(1) << "We couldn't create/update the object: " << sync.objectID << std::endl;
     106          }
    105107          ++it;
    106108        }
     
    108110        // we have our object
    109111        if(! it->updateData(sync))
     112        {
    110113          COUT(1) << "We couldn't update objectID: " \
    111114          << sync.objectID << "; classID: " << sync.classID << std::endl;
     115        }
    112116      }
    113117      ++it;
  • code/branches/console/src/network/PacketDecoder.cc

    r1064 r1438  
    176176    //since data is not allocated, because it's just a pointer, allocate it with size of gamestatedatastream
    177177    if(currentState->compsize==0)
     178    {
    178179      COUT(2) << "compsize is 0" << std::endl;
     180    }
    179181    currentState->data = (unsigned char*)(malloc( currentState->compsize ));
    180182    if(currentState->data==NULL)
     183    {
    181184      COUT(2) << "Gamestatepacket-decoder: memory leak" << std::endl;
     185    }
    182186    //copy the GameStateCompressed data
    183187    //std::cout << "packet size (enet): " << packet->dataLength << std::endl;
     
    252256  {
    253257    if(clientId!=CLIENTID_CLIENT)
     258    {
    254259      COUT(5) << "client: " << clientId << std::endl;
     260    }
    255261    COUT(5) << "data id: " << data->id << std::endl;
    256262    COUT(5) << "data:    " << data->message << std::endl;
  • code/branches/console/src/network/dummyclient3.cc

    r1062 r1438  
    5151  Client client( str, PORT );
    5252  if ( client.establishConnection() )
     53  {
    5354    COUT(3) << "connection established" << std::endl;
    54   else COUT(0) << "problems establishing connection" << std::endl;
     55  }
     56  else
     57  {
     58    COUT(0) << "problems establishing connection" << std::endl;
     59  }
    5560  char message[10000];
    5661  char signs[] = "abcdefghijklmnopqrstuvwxy";
Note: See TracChangeset for help on using the changeset viewer.