int freeCollHandle (int handleInx) { if (handleInx < 0 || handleInx >= NUM_COLL_HANDLE) { rodsLog (LOG_NOTICE, "freeCollHandle: handleInx %d out of range", handleInx); return (SYS_FILE_DESC_OUT_OF_RANGE); } /* don't free specColl. It is in cache */ #if 0 clearCollHandle (&CollHandle[handleInx], 0); #else clearCollHandle (&CollHandle[handleInx], 1); #endif memset (&CollHandle[handleInx], 0, sizeof (collHandle_t)); return (0); }
int freeCollHandle( int handleInx ) { if ( handleInx < 0 || handleInx >= CollHandle.size() ) { rodsLog( LOG_NOTICE, "freeCollHandle: handleInx %d out of range", handleInx ); return SYS_FILE_DESC_OUT_OF_RANGE; } /* don't free specColl. It is in cache */ clearCollHandle( &CollHandle[handleInx], 1 ); memset( &CollHandle[handleInx], 0, sizeof( collHandle_t ) ); return 0; }