From: Zoran V. <vas...@us...> - 2005-10-10 13:33:24
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18687/nsd Modified Files: fastpath.c Log Message: Fixed one Tcl_Stat() usage which was wrong. Index: fastpath.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/fastpath.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** fastpath.c 10 Oct 2005 13:20:31 -0000 1.23 --- fastpath.c 10 Oct 2005 13:33:23 -0000 1.24 *************** *** 150,158 **** NsServer *servPtr; ! if (!FastStat(file, &st)) { return Ns_ConnReturnNotFound(conn); } ! ! server = Ns_ConnServer(conn); servPtr = NsGetServer(server); --- 150,158 ---- NsServer *servPtr; ! if (FastStat(file, &st) == 0) { return Ns_ConnReturnNotFound(conn); } ! ! server = Ns_ConnServer(conn); servPtr = NsGetServer(server); *************** *** 479,483 **** FastStat(CONST char *file, Tcl_StatBuf *stPtr) { ! if (Tcl_Stat(file, stPtr) != 0) { if (Tcl_GetErrno() != ENOENT && Tcl_GetErrno() != EACCES) { Ns_Log(Error, "fastpath: stat(%s) failed: %s", --- 479,491 ---- FastStat(CONST char *file, Tcl_StatBuf *stPtr) { ! Tcl_Obj *path; ! int status; ! ! path = Tcl_NewStringObj(file, -1); ! Tcl_IncrRefCount(path); ! status = Tcl_FSStat(path, stPtr); ! Tcl_DecrRefCount(path); ! ! if (status != 0) { if (Tcl_GetErrno() != ENOENT && Tcl_GetErrno() != EACCES) { Ns_Log(Error, "fastpath: stat(%s) failed: %s", |