Use cross platform stat type and free mem of lastDir.

This commit is contained in:
Klaas Freitag 2012-12-05 12:38:29 +01:00
parent aaa8fe6e34
commit 823706caac

View file

@ -1530,7 +1530,7 @@ static int owncloud_sendfile(csync_vio_method_handle_t *src, csync_vio_method_ha
ne_request *request = write_ctx->req;
if( request ) {
/* stat the source-file to get the file size. */
struct stat sb;
csync_stat_t sb;
if( fstat( fd, &sb ) == 0 ) {
/* Attach the request to the file descriptor */
ne_set_request_body_fd(request, fd, 0, sb.st_size );
@ -2004,6 +2004,8 @@ void vio_module_shutdown(csync_vio_method_t *method) {
SAFE_FREE( dav_session.proxy_pwd );
SAFE_FREE( dav_session.session_key);
SAFE_FREE( _lastDir );
/* free stat memory */
fill_stat_cache(NULL);