00001
00002
00003
00004
00005
00006 #include "openCollection.h"
00007 #include "closeCollection.h"
00008 #include "objMetaOpr.h"
00009 #include "rcGlobalExtern.h"
00010 #include "rsGlobalExtern.h"
00011
00012 int
00013 rsCloseCollection (rsComm_t *rsComm, int *handleInxInp)
00014 {
00015 int status;
00016 int handleInx = *handleInxInp;
00017
00018 if (handleInx < 0 || handleInx >= NUM_COLL_HANDLE ||
00019 CollHandle[handleInx].inuseFlag != FD_INUSE) {
00020 rodsLog (LOG_NOTICE,
00021 "rsCloseCollection: handleInx %d out of range",
00022 handleInx);
00023 return (SYS_FILE_DESC_OUT_OF_RANGE);
00024 }
00025
00026 status = freeCollHandle (handleInx);
00027
00028 return (status);
00029 }