summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2008-10-06 20:18:42 +0000
committererdgeist <>2008-10-06 20:18:42 +0000
commit719858548d6b3029c0d0a6f3cba5b2aa3aa09c8c (patch)
treec0b63011e22029600aa2e119dfc8911b0412043e
parent0dafc2ab2640f9a7ef6f5319d247a1c7b9d1127a (diff)
Bugfix: API change missed in two points, when calling return_peers_for_torrent. is_tcp was replaced by FLAG_TCP or FLAG_UDP
-rw-r--r--ot_http.c2
-rw-r--r--ot_udp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ot_http.c b/ot_http.c
index 8a0f069..68bf58a 100644
--- a/ot_http.c
+++ b/ot_http.c
@@ -488,7 +488,7 @@ static ssize_t http_handle_announce( const int64 client_socket, char *data ) {
488 len = remove_peer_from_torrent( hash, &peer, SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, FLAG_TCP ); 488 len = remove_peer_from_torrent( hash, &peer, SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, FLAG_TCP );
489 else { 489 else {
490 torrent = add_peer_to_torrent( hash, &peer WANT_SYNC_PARAM( 0 ) ); 490 torrent = add_peer_to_torrent( hash, &peer WANT_SYNC_PARAM( 0 ) );
491 if( !torrent || !( len = return_peers_for_torrent( hash, numwant, SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, 1 ) ) ) HTTPERROR_500; 491 if( !torrent || !( len = return_peers_for_torrent( hash, numwant, SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, FLAG_TCP ) ) ) HTTPERROR_500;
492 } 492 }
493 stats_issue_event( EVENT_ANNOUNCE, FLAG_TCP, len); 493 stats_issue_event( EVENT_ANNOUNCE, FLAG_TCP, len);
494 return len; 494 return len;
diff --git a/ot_udp.c b/ot_udp.c
index 64f9c50..1688d69 100644
--- a/ot_udp.c
+++ b/ot_udp.c
@@ -115,7 +115,7 @@ void handle_udp4( int64 serversocket ) {
115 if( !torrent ) 115 if( !torrent )
116 return; /* XXX maybe send error */ 116 return; /* XXX maybe send error */
117 117
118 r = 8 + return_peers_for_torrent( hash, numwant, static_outbuf + 8, 0 ); 118 r = 8 + return_peers_for_torrent( hash, numwant, static_outbuf + 8, FLAG_UDP );
119 } 119 }
120 120
121 socket_send4( serversocket, static_outbuf, r, remoteip, remoteport ); 121 socket_send4( serversocket, static_outbuf, r, remoteip, remoteport );