From 456dbdd935fafda3db9a78695ab3a73bfabb8bcc Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 18 Feb 2011 00:36:16 +0000 Subject: [PATCH] Export uTP send_to callback. --- libtransmission/tr-utp.c | 8 ++++---- libtransmission/tr-utp.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libtransmission/tr-utp.c b/libtransmission/tr-utp.c index 5c506b3d9..1c76b3fd4 100644 --- a/libtransmission/tr-utp.c +++ b/libtransmission/tr-utp.c @@ -75,9 +75,9 @@ incoming(void *closure, struct UTPSocket *s) tr_peerMgrAddIncoming(ss->peerMgr, &addr, port, -1, s); } -static void -send_to(void *closure, const unsigned char *buf, size_t buflen, - const struct sockaddr *to, socklen_t tolen) +void +tr_utpSendTo(void *closure, const unsigned char *buf, size_t buflen, + const struct sockaddr *to, socklen_t tolen) { tr_session *ss = (tr_session*)closure; @@ -115,7 +115,7 @@ tr_utpPacket(const unsigned char *buf, size_t buflen, reset_timer(); } - return UTP_IsIncomingUTP(incoming, send_to, ss, + return UTP_IsIncomingUTP(incoming, tr_utpSendTo, ss, buf, buflen, from, fromlen); } diff --git a/libtransmission/tr-utp.h b/libtransmission/tr-utp.h index 54b2e9ed0..9a3249d62 100644 --- a/libtransmission/tr-utp.h +++ b/libtransmission/tr-utp.h @@ -26,3 +26,6 @@ int tr_utpPacket(const unsigned char *buf, size_t buflen, tr_session *ss); void tr_utpClose( tr_session * ); + +void tr_utpSendTo(void *closure, const unsigned char *buf, size_t buflen, + const struct sockaddr *to, socklen_t tolen);