Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1482 closed Bug (fixed)

libtransmission/fdlimit.c preallocateFile uses undeclared desiredFileSize on WIN32

Reported by: lubomir.marinov Owned by: charles
Priority: Normal Milestone: 1.41
Component: libtransmission Version:
Severity: Normal Keywords:
Cc:

Description

The function preallocateFile defined in libtransmission/fdlimit.c uses an undeclared variable desiredFileSize when WIN32 is defined and thus causes a compilation error. I guess the function argument length should be used instead.

Change History (5)

comment:1 Changed 12 years ago by charles

  • Milestone changed from None Set to 1.50
  • Status changed from new to assigned

comment:2 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in r7127. Thanks for the heads-up.

comment:3 Changed 12 years ago by spry

  • Resolution fixed deleted
  • Status changed from closed to reopened

Charles, it should be

LARGE_INTEGER li;
li.QuadPart = length;
success = SetFilePointerEx( hFile, li, NULL, FILE_BEGIN ) && SetEndOfFile( hFile );
CloseHandle( hFile );

comment:4 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed

thanks for the help. I've put your version in r7129.

comment:5 Changed 12 years ago by charles

  • Milestone changed from 1.50 to 1.41

1.4x: r7142

Note: See TracTickets for help on using tickets.