@@ -1037,18 +1037,18 @@ void Channel::RecvDatagram (evutil_socket_t socket) {
1037
1037
FileTransfer* ft = FileTransfer::Find (hash);
1038
1038
if (!ft)
1039
1039
{
1040
- ZeroState *zs = ZeroState::GetInstance ();
1041
- ft = zs->Find (hash);
1042
- if (!ft)
1043
- return_log (" %s #0 hash %s unknown, requested by %s\n " ,tintstr (),hash.hex ().c_str (),addr.str ());
1040
+ ZeroState *zs = ZeroState::GetInstance ();
1041
+ ft = zs->Find (hash);
1042
+ if (!ft)
1043
+ return_log (" %s #0 hash %s unknown, requested by %s\n " ,tintstr (),hash.hex ().c_str (),addr.str ());
1044
1044
}
1045
- else if (ft->IsZeroState () && !ft->hashtree ()->is_complete ())
1046
- {
1047
- return_log (" %s #0 zero hash %s broken, requested by %s\n " ,tintstr (),hash.hex ().c_str (),addr.str ());
1048
- }
1045
+ else if (ft->IsZeroState () && !ft->hashtree ()->is_complete ())
1046
+ {
1047
+ return_log (" %s #0 zero hash %s broken, requested by %s\n " ,tintstr (),hash.hex ().c_str (),addr.str ());
1048
+ }
1049
1049
if (!ft->IsOperational ())
1050
1050
{
1051
- return_log (" %s #0 hash %s broken, requested by %s\n " ,tintstr (),hash.hex ().c_str (),addr.str ());
1051
+ return_log (" %s #0 hash %s broken, requested by %s\n " ,tintstr (),hash.hex ().c_str (),addr.str ());
1052
1052
}
1053
1053
1054
1054
dprintf (" %s #0 -hash ALL %s\n " ,tintstr (),hash.hex ().c_str ());
@@ -1057,18 +1057,18 @@ void Channel::RecvDatagram (evutil_socket_t socket) {
1057
1057
Channel* existchannel = ft->FindChannel (addr,NULL );
1058
1058
if (existchannel)
1059
1059
{
1060
- // Arno: 2011-10-13: Ignore if established, otherwise consider
1061
- // it a concurrent connection attempt.
1062
- if (existchannel->is_established ()) {
1063
- // ARNOTODO: Read complete handshake here so we know whether
1064
- // attempt is to new channel or to existing. Currently read
1065
- // in OnHandshake()
1066
- //
1067
- return_log (" %s #0 have a channel already to %s\n " ,tintstr (),addr.str ());
1068
- } else {
1069
- channel = existchannel;
1070
- // fprintf(stderr,"Channel::RecvDatagram: HANDSHAKE: reuse channel %s\n", channel->peer_.str() );
1071
- }
1060
+ // Arno: 2011-10-13: Ignore if established, otherwise consider
1061
+ // it a concurrent connection attempt.
1062
+ if (existchannel->is_established ()) {
1063
+ // ARNOTODO: Read complete handshake here so we know whether
1064
+ // attempt is to new channel or to existing. Currently read
1065
+ // in OnHandshake()
1066
+ //
1067
+ return_log (" %s #0 have a channel already to %s\n " ,tintstr (),addr.str ());
1068
+ } else {
1069
+ channel = existchannel;
1070
+ // fprintf(stderr,"Channel::RecvDatagram: HANDSHAKE: reuse channel %s\n", channel->peer_.str() );
1071
+ }
1072
1072
}
1073
1073
if (channel == NULL ) {
1074
1074
// fprintf(stderr,"Channel::RecvDatagram: HANDSHAKE: create new channel %s\n", addr.str() );
@@ -1088,10 +1088,10 @@ void Channel::RecvDatagram (evutil_socket_t socket) {
1088
1088
channel = channels[mych];
1089
1089
if (!channel)
1090
1090
return_log (" %s #%u is already closed\n " ,tintstr (),mych);
1091
- if (channel->IsDiffSenderOrDuplicate (addr,mych)) {
1092
- channel->Schedule4Close ();
1093
- return ;
1094
- }
1091
+ if (channel->IsDiffSenderOrDuplicate (addr,mych)) {
1092
+ channel->Schedule4Close ();
1093
+ return_log ( " %s #%u is duplicate \n " , tintstr (),mych) ;
1094
+ }
1095
1095
channel->own_id_mentioned_ = true ;
1096
1096
}
1097
1097
channel->raw_bytes_down_ += evboriglen;
@@ -1100,7 +1100,7 @@ void Channel::RecvDatagram (evutil_socket_t socket) {
1100
1100
1101
1101
// dprintf("%s #%u peer %s recv_peer %s addr %s\n", tintstr(),mych, channel->peer().str(), channel->recv_peer().str(), addr.str() );
1102
1102
1103
- channel->Recv (evb);
1103
+ channel->Recv (evb);
1104
1104
1105
1105
evbuffer_free (evb);
1106
1106
// SAFECLOSE
0 commit comments