diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-07-20 17:06:21 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-07-20 17:06:21 +0000 |
| commit | cd6b6e359135f88afffbaa31c126489aa9813571 (patch) | |
| tree | bc46068d0f73e8857931b6bb48cf96dbdccd59bd /src/PeerConnection.cc | |
| parent | 6e7893c8489b6bd100699edfc480d95afda66bc1 (diff) | |
2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that prevents cookies from being sent to the
server
if the domain of cookie is FQDN and starts with ".".
* src/Cookie.cc (match)
To add the ability to change peer id.
* src/DefaultBtContext.h
(_peerIdPrefix): New variable
(setPeerIdPrefix): New function.
* src/torrentRequestInfo.cc
(execute): Set the option value of PREF_PEER_ID_PREFIX to
DefaultBtContext.
* src/main.cc (main): Added peer-id-prefix command-line option.
The usage message is not added yet.
* src/DefaultBtContext.cc
(generatePeerId): Use _peerIdPrefix.
* src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
Diffstat (limited to 'src/PeerConnection.cc')
| -rw-r--r-- | src/PeerConnection.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/PeerConnection.cc b/src/PeerConnection.cc index ca68cd04..137bf383 100644 --- a/src/PeerConnection.cc +++ b/src/PeerConnection.cc @@ -52,12 +52,12 @@ PeerConnection::PeerConnection(int32_t cuid, currentPayloadLength(0), lenbufLength(0) { - logger->debug("PeerConnection::instantiated"); + //logger->debug("PeerConnection::instantiated"); } PeerConnection::~PeerConnection() { - logger->debug("PeerConnection::deleted"); + //logger->debug("PeerConnection::deleted"); } int32_t PeerConnection::sendMessage(const unsigned char* data, int32_t dataLength) { @@ -92,7 +92,7 @@ bool PeerConnection::receiveMessage(unsigned char* data, int32_t& dataLength) { //payloadLen = ntohl(nPayloadLen); int32_t payloadLength = ntohl(*((int32_t*)lenbuf)); if(payloadLength > MAX_PAYLOAD_LEN || payloadLength < 0) { - throw new DlAbortEx("max payload length exceeded or invalid. length = %d", + throw new DlAbortEx(EX_TOO_LONG_PAYLOAD, payloadLength); } currentPayloadLength = payloadLength; |
