Skip Menu |

This queue is for tickets about the Filesys-SmbClient CPAN distribution.

Report information
The Basics
Id: 13173
Status: open
Priority: 0/
Queue: Filesys-SmbClient

People
Owner: Nobody in particular
Requestors: dpavlin [...] rot13.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 3.0
Fixed in: (no value)



read method doesn't return undef when file reading is over. Attached diff fixes problem. (also included is fix for compilation error).
--- Filesys-SmbClient-3.0/SmbClient.xs 2005-03-04 17:22:13.000000000 +0100 +++ Filesys-SmbClient-3.0-fixed/SmbClient.xs 2005-06-09 17:55:39.000000000 +0200 @@ -188,6 +188,7 @@ #ifdef VERBOSE fprintf(stderr, "! Filesys::SmbClient : _readdir: %d\n", fd); #endif +#undef readdir dirp = (struct smbc_dirent *)context->readdir(context, fd); if (dirp) { XPUSHs(sv_2mortal(newSVnv(dirp->smbc_type))); @@ -367,7 +368,7 @@ "Read %s : %s\n", buf, strerror(errno)); } #endif - if (returnValue<0) {RETVAL=&PL_sv_undef;} + if (returnValue<=0) {RETVAL=&PL_sv_undef;} else {RETVAL=newSVpvn(buf,returnValue);} OUTPUT: RETVAL
Le Jeu. Jun. 09 12:22:23 2005, DPAVLIN a écrit : Show quoted text
> read method doesn't return undef when file reading is over. > > Attached diff fixes problem. (also included is fix for compilation error).
Thank you for the fix. Will be in the next release