From a413cb50f7035fdaa1c85b6247b98946b3342ef1 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 24 Dec 2006 15:55:59 +0000 Subject: --- src/BtNotInterestedMessage.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/BtNotInterestedMessage.cc') diff --git a/src/BtNotInterestedMessage.cc b/src/BtNotInterestedMessage.cc index 4d3fc4eb..9bf83e66 100644 --- a/src/BtNotInterestedMessage.cc +++ b/src/BtNotInterestedMessage.cc @@ -40,7 +40,7 @@ BtNotInterestedMessageHandle BtNotInterestedMessage::create(const unsigned char* if(dataLength != 1) { throw new DlAbortEx("invalid payload size for %s, size = %d. It should be %d", "not interested", dataLength, 1); } - int32_t id = PeerMessageUtil::getId(data); + uint8_t id = PeerMessageUtil::getId(data); if(id != ID) { throw new DlAbortEx("invalid ID=%d for %s. It should be %d.", id, "not interested", ID); @@ -59,14 +59,14 @@ bool BtNotInterestedMessage::sendPredicate() const { uint32_t BtNotInterestedMessage::MESSAGE_LENGTH = 5; -const char* BtNotInterestedMessage::getMessage() { +const unsigned char* BtNotInterestedMessage::getMessage() { if(!msg) { /** * len --- 1, 4bytes * id --- 3, 1byte * total: 5bytes */ - msg = new char[MESSAGE_LENGTH]; + msg = new unsigned char[MESSAGE_LENGTH]; PeerMessageUtil::createPeerMessageString(msg, MESSAGE_LENGTH, 1, ID); } return msg; -- cgit