allow NULL to be passed to create_torrent::set_comment and create_torrent::set_creator

This commit is contained in:
Arvid Norberg 2011-09-22 21:24:50 +00:00
parent 976a50384a
commit 8c23b0e3ce
2 changed files with 5 additions and 2 deletions

View File

@ -92,6 +92,7 @@
incoming connection incoming connection
* added more detailed instrumentation of the disk I/O thread * added more detailed instrumentation of the disk I/O thread
* allow NULL to be passed to create_torrent::set_comment and create_torrent::set_creator
* fix UPnP issue for routers with multiple PPPoE connections * fix UPnP issue for routers with multiple PPPoE connections
* fix issue where event=stopped announces wouldn't be sent when closing session * fix issue where event=stopped announces wouldn't be sent when closing session
* fix possible hang in file::readv() on windows * fix possible hang in file::readv() on windows

View File

@ -489,7 +489,8 @@ namespace libtorrent
void create_torrent::set_comment(char const* str) void create_torrent::set_comment(char const* str)
{ {
m_comment = str; if (str == 0) m_comment.clear();
else m_comment = str;
} }
void create_torrent::set_encryption_key(std::string const& key) void create_torrent::set_encryption_key(std::string const& key)
@ -499,7 +500,8 @@ namespace libtorrent
void create_torrent::set_creator(char const* str) void create_torrent::set_creator(char const* str)
{ {
m_created_by = str; if (str == 0) m_created_by.clear();
else m_created_by = str;
} }
} }