[Orxonox-commit 3029] r7725 - code/branches/masterserver/src/libraries/network
smerkli at orxonox.net
smerkli at orxonox.net
Mon Dec 6 21:14:28 CET 2010
Author: smerkli
Date: 2010-12-06 21:14:27 +0100 (Mon, 06 Dec 2010)
New Revision: 7725
Modified:
code/branches/masterserver/src/libraries/network/MasterServerComm.cc
code/branches/masterserver/src/libraries/network/MasterServerComm.h
Log:
fixed some warnings
Modified: code/branches/masterserver/src/libraries/network/MasterServerComm.cc
===================================================================
--- code/branches/masterserver/src/libraries/network/MasterServerComm.cc 2010-12-03 13:58:02 UTC (rev 7724)
+++ code/branches/masterserver/src/libraries/network/MasterServerComm.cc 2010-12-06 20:14:27 UTC (rev 7725)
@@ -75,7 +75,7 @@
enet_host_destroy(this->client);
}
- int MasterServerComm::connect( char *address, unsigned int port )
+ int MasterServerComm::connect( const char *address, unsigned int port )
{
/* Connect to address:port. */
enet_address_set_host( &this->address, address );
@@ -140,12 +140,16 @@
addrconv, 49 );
/* DEBUG */
- printf( "A packet of length %u containing %s was "
- "received from %s on channel %u.\n",
- this->event->packet->dataLength,
- this->event->packet->data,
- addrconv,
- this->event->channelID );
+ COUT(3) << "A packet of length " << this->event->packet->dataLength
+ << " containing " << this->event->packet->data
+ << " was received from " << addrconv
+ << " on channel " << this->event->channelID;
+ //printf( "A packet of length %u containing %s was "
+ //"received from %s on channel %u.\n",
+ //this->event->packet->dataLength,
+ //this->event->packet->data,
+ //addrconv,
+ //this->event->channelID );
/* END DEBUG */
/* call the supplied callback, if any. */
@@ -166,7 +170,7 @@
return 0;
}
- int MasterServerComm::sendRequest( char *data )
+ int MasterServerComm::sendRequest( const char *data )
{
/* send the data to the friend */
/* Create a reliable packet of size 7 containing "packet\0" */
Modified: code/branches/masterserver/src/libraries/network/MasterServerComm.h
===================================================================
--- code/branches/masterserver/src/libraries/network/MasterServerComm.h 2010-12-03 13:58:02 UTC (rev 7724)
+++ code/branches/masterserver/src/libraries/network/MasterServerComm.h 2010-12-06 20:14:27 UTC (rev 7725)
@@ -56,14 +56,14 @@
*
* Connect to the master server with the given address on the given port.
*/
- int connect( char *address, unsigned int port );
+ int connect( const char *address, unsigned int port );
/** \param data The data to be sent.
* \return 0 for success, other for error.
*
* Send a request to the master server containing data specified in data
*/
- int sendRequest( char *data );
+ int sendRequest( const char *data );
/** \param data The data to be sent.
* \return 0 for success, other for error.
More information about the Orxonox-commit
mailing list