* Cleaned up socket read/write error handling.

* Fixed a bug where PeerConnectionSeed was reading the wrong type of
message.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@554 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-09-05 18:50:48 +00:00
parent 3bd99aee50
commit 8732e457fa
6 changed files with 109 additions and 42 deletions
+2 -2
View File
@@ -66,8 +66,8 @@ OptionFile::parse_line(const char* line) {
opt[0] = '\0';
// Check for empty lines, and options within "abc".
if ((result = std::sscanf(line, "%64s = \"%512[^\"]s", key, opt)) != 2 &&
(result = std::sscanf(line, "%64s = %512s", key, opt)) != 2 &&
if ((result = std::sscanf(line, "%63s = \"%511[^\"]s", key, opt)) != 2 &&
(result = std::sscanf(line, "%63s = %511s", key, opt)) != 2 &&
result == 1)
throw std::runtime_error("Error parseing option file.");