fixes to close-reason patch

This commit is contained in:
Arvid Norberg 2015-03-01 07:02:32 +00:00
parent 0c8aee014c
commit f981221cff
2 changed files with 2 additions and 14 deletions

View File

@ -129,10 +129,6 @@ namespace libtorrent
#endif #endif
default: default:
// we should include this error code in the map
fprintf(stderr, "(%s : %d) %s\n", ec.category().name(), ec.value()
, ec.message().c_str());
TORRENT_ASSERT(false);
return close_no_reason; return close_no_reason;
} }
} }
@ -168,14 +164,6 @@ namespace libtorrent
return close_no_memory; return close_no_memory;
} }
fprintf(stderr, "(%s : %d) %s\n", ec.category().name(), ec.value()
, ec.message().c_str());
// we should proboably include this in the map
TORRENT_ASSERT(false);
// TODO: map some system errors too?
return close_no_reason; return close_no_reason;
} }
} }

View File

@ -310,7 +310,7 @@ namespace libtorrent
break; break;
#ifdef TORRENT_USE_OPENSSL #ifdef TORRENT_USE_OPENSSL
case socket_type_int_impl<ssl_stream<utp_stream> >::value: case socket_type_int_impl<ssl_stream<utp_stream> >::value:
get<ssl_stream<utp_stream> >()->set_close_reason(boost::uint16_t code); get<ssl_stream<utp_stream> >()->lowest_layer().set_close_reason(code);
break; break;
#endif #endif
default: break; default: break;
@ -325,7 +325,7 @@ namespace libtorrent
return get<utp_stream>()->get_close_reason(); return get<utp_stream>()->get_close_reason();
#ifdef TORRENT_USE_OPENSSL #ifdef TORRENT_USE_OPENSSL
case socket_type_int_impl<ssl_stream<utp_stream> >::value: case socket_type_int_impl<ssl_stream<utp_stream> >::value:
return get<ssl_stream<utp_stream> >()->get_close_reason(); return get<ssl_stream<utp_stream> >()->lowest_layer().get_close_reason();
#endif #endif
default: return 0; default: return 0;
} }