summaryrefslogtreecommitdiff
path: root/src/BtNotInterestedMessage.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-12-24 15:55:59 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-12-24 15:55:59 +0000
commita413cb50f7035fdaa1c85b6247b98946b3342ef1 (patch)
treec8144080a3006de3bbd8ca6a43cbc9e8a49b3c23 /src/BtNotInterestedMessage.cc
parent708b9f4a3da70e963968c0a013dea6777c6b276e (diff)
Diffstat (limited to 'src/BtNotInterestedMessage.cc')
-rw-r--r--src/BtNotInterestedMessage.cc6
1 files changed, 3 insertions, 3 deletions
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;