diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-02 11:23:05 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-02 11:23:05 +0000 |
commit | b8dbdb628ba7a07a785e494d0ed76ebfe9e06615 (patch) | |
tree | 173d22e656ac771e473cdb7c1d035963d39c27e1 /src/net | |
parent | b05628214d64e579504c87da72e79c024245a631 (diff) | |
download | mana-b8dbdb628ba7a07a785e494d0ed76ebfe9e06615.tar.gz mana-b8dbdb628ba7a07a785e494d0ed76ebfe9e06615.tar.bz2 mana-b8dbdb628ba7a07a785e494d0ed76ebfe9e06615.tar.xz mana-b8dbdb628ba7a07a785e494d0ed76ebfe9e06615.zip |
Made config.xml, tmw.log and chatlog.txt always appear in ~/.tmw on *nix.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/network.cpp | 14 | ||||
-rw-r--r-- | src/net/protocol.cpp | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/net/network.cpp b/src/net/network.cpp index 44d07e13..fa009341 100644 --- a/src/net/network.cpp +++ b/src/net/network.cpp @@ -45,7 +45,7 @@ fd_set write_socket; void WFIFOSET(int len) { if (out_size + len >= buffer_size) { - logger.log("Warning: Output buffer full"); + logger->log("Warning: Output buffer full"); } else { out_size += len; @@ -154,16 +154,16 @@ void flush() } } if (ret == SOCKET_ERROR) { - logger.error("Socket Error"); + logger->error("Socket Error"); #ifdef WIN32 - logger.log("Error: Socket error: %i ", WSAGetLastError()); + logger->log("Error: Socket error: %i ", WSAGetLastError()); if (WSAGetLastError() == 10053) - logger.log("Error: Packet size error"); + logger->log("Error: Packet size error"); /** Probably the last packet you sent, was defined with * wrong size: WFIFOSET(size); */ #else - logger.log("Error: Undefined socket error"); + logger->log("Error: Undefined socket error"); #endif } } @@ -175,9 +175,9 @@ void flush() ret = recv(sock, in+in_size, RFIFOSPACE, 0); if (ret == SOCKET_ERROR) { #ifdef WIN32 - logger.log("Error: Socket error: %i ", WSAGetLastError()); + logger->log("Error: Socket error: %i ", WSAGetLastError()); #else - logger.log("Error: Undefined socket error"); + logger->log("Error: Undefined socket error"); #endif } else RFIFOSET(ret); // Set size of available data to read } diff --git a/src/net/protocol.cpp b/src/net/protocol.cpp index d2761457..92d1fae5 100644 --- a/src/net/protocol.cpp +++ b/src/net/protocol.cpp @@ -158,7 +158,7 @@ void map_start() // Connect to map server if (open_session(iptostring(map_address), map_port) == SOCKET_ERROR) { - logger.log("Warning: Unable to connect to map server"); + logger->log("Warning: Unable to connect to map server"); throw "Unable to connect to map server"; return; } @@ -182,13 +182,13 @@ void map_start() startX = get_x(RFIFOP(6)); startY = get_y(RFIFOP(6)); int direction = get_direction(RFIFOP(6)); - logger.log("Protocol: Player start position: (%d, %d), Direction: %d", + logger->log("Protocol: Player start position: (%d, %d), Direction: %d", startX, startY, direction); RFIFOSKIP(11); } else if (0x0081) { - logger.log("Warning: Map server D/C"); + logger->log("Warning: Map server D/C"); } else { - logger.error("Unknown packet: map_start"); + logger->error("Unknown packet: map_start"); } // Send "map loaded" |