Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1438


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
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/audio/AudioStream.cc

    r1064 r1438  
    117117
    118118            for(int i = 0; i < vorbisComment->comments; i++)
     119            {
    119120                COUT(3) << "   " << vorbisComment->user_comments[i] << std::endl;
     121            }
    120122
    121123            COUT(3) << std::endl;
  • code/branches/console/src/core/Script.cc

    r1334 r1438  
    128128    if (error == 0)
    129129      error = lua_pcall(luaState_, 0, 0, 0);
    130     if (error != 0) COUT(2) << "Error in Lua-script: " << lua_tostring(luaState_, -1) << std::endl;
     130    if (error != 0)
     131    {
     132      COUT(2) << "Error in Lua-script: " << lua_tostring(luaState_, -1) << std::endl;
     133    }
    131134  }
    132135
  • code/branches/console/src/core/TclBind.cc

    r1416 r1438  
    110110
    111111        if (!CommandExecutor::execute(command, false))
     112        {
    112113            COUT(1) << "Error: Can't execute command \"" << command << "\"!" << std::endl;
     114        }
    113115
    114116        if (CommandExecutor::getLastEvaluation().hasReturnvalue())
     
    124126
    125127        if (!CommandExecutor::execute(command, false))
     128        {
    126129            COUT(1) << "Error: Can't execute command \"" << command << "\"!" << std::endl;
     130        }
    127131    }
    128132
     
    133137            std::string output = TclBind::getInstance().interpreter_->eval(tclcode);
    134138            if (output != "")
     139            {
    135140                COUT(0) << "tcl> " << output << std::endl;
     141            }
    136142            return output;
    137143        }
  • 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.