diff --git a/src/protocol/bittorrent/common.c b/src/protocol/bittorrent/common.c index a941952e8..49b445d2b 100644 --- a/src/protocol/bittorrent/common.c +++ b/src/protocol/bittorrent/common.c @@ -56,12 +56,12 @@ get_peer_id(bittorrent_id_T peer_id) return hex; } -char * +const char * get_peer_message(bittorrent_message_id_T message_id) { static struct { bittorrent_message_id_T message_id; - char *name; + const char *name; } messages[] = { { BITTORRENT_MESSAGE_INCOMPLETE, "incomplete" }, { BITTORRENT_MESSAGE_KEEP_ALIVE, "keep-alive" }, diff --git a/src/protocol/bittorrent/common.h b/src/protocol/bittorrent/common.h index 73d356337..a605cc0b2 100644 --- a/src/protocol/bittorrent/common.h +++ b/src/protocol/bittorrent/common.h @@ -399,7 +399,7 @@ void done_bittorrent_message(struct bittorrent_message *message); /* ************************************************************************** */ char *get_peer_id(bittorrent_id_T peer); -char *get_peer_message(bittorrent_message_id_T message_id); +const char *get_peer_message(bittorrent_message_id_T message_id); /* ************************************************************************** */ /* Peer request management: */