tr_dbg( "Banned IP address \"%s\" tried to connect to us", tr_ntop_non_ts( addr ) );
if(socket >= 0)
tr_netClose( session, socket );
-#ifdef WITH_UTP
else
UTP_Close( utp_socket );
-#endif
}
else if( getExistingHandshake( &manager->incomingHandshakes, addr ) )
{
if(socket >= 0)
tr_netClose( session, socket );
-#ifdef WITH_UTP
else
UTP_Close( utp_socket );
-#endif
}
else /* we don't have a connection to them yet... */
{
*/
+#include <assert.h>
#include <unistd.h>
#include <event.h>
#include "peer-io.h"
#include "peer-mgr.h"
#include "tr-utp.h"
+#include "utils.h"
+
+#define MY_NAME "UTP"
+
+#define dbgmsg( ... ) \
+ do { \
+ if( tr_deepLoggingIsActive( ) ) \
+ tr_deepLog( __FILE__, __LINE__, MY_NAME, __VA_ARGS__ ); \
+ } while( 0 )
#ifndef WITH_UTP
+void
+UTP_Close(struct UTPSocket * socket )
+{
+ tr_nerr( MY_NAME, "UTP_Close(%p) was called.", socket );
+ dbgmsg( "UTP_Close(%p) was called.", socket );
+ assert( 0 ); /* FIXME: this is too much for the long term, but probably needed in the short term */
+}
+
int tr_utpPacket(const unsigned char *buf UNUSED, size_t buflen UNUSED,
const struct sockaddr *from UNUSED, socklen_t fromlen UNUSED,
tr_session *ss UNUSED) { return -1; }