From: Fredrik Tolf Date: Fri, 21 Mar 2008 20:28:35 +0000 (+0100) Subject: Fixed buffer eating bug in transfer system. X-Git-Tag: 1.3~11^2~1 X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=2e123451c0399c4707c8f40d0d8d6d372b6f9960;p=doldaconnect.git Fixed buffer eating bug in transfer system. --- diff --git a/daemon/transfer.c b/daemon/transfer.c index b4765ae..1e674e6 100644 --- a/daemon/transfer.c +++ b/daemon/transfer.c @@ -274,7 +274,7 @@ void transferendofdata(struct transfer *transfer) } } -size_t transferdatasize(struct transfer *transfer) +ssize_t transferdatasize(struct transfer *transfer) { return(sockqueueleft(transfer->localend)); } diff --git a/daemon/transfer.h b/daemon/transfer.h index b4ffa69..4678254 100644 --- a/daemon/transfer.h +++ b/daemon/transfer.h @@ -113,7 +113,7 @@ void transfersetlocalend(struct transfer *transfer, struct socket *sk); void *transfergetdata(struct transfer *transfer, size_t *size); int forkfilter(struct transfer *transfer); void transferputdata(struct transfer *transfer, void *buf, size_t size); -size_t transferdatasize(struct transfer *transfer); +ssize_t transferdatasize(struct transfer *transfer); void transferendofdata(struct transfer *transfer); void transferprepul(struct transfer *transfer, off_t size, off_t start, off_t end, struct socket *lesk); void transferstartul(struct transfer *transfer, struct socket *sk);