irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

rsStreamClose.cpp
Go to the documentation of this file.
1 
3 /* rsFileRead.c - server routine that handles the fileRead
4  * API
5  */
6 
7 #include "streamClose.h"
8 #include "miscServerFunct.hpp"
9 #include "rsGlobalExtern.hpp"
10 #include "rsStreamClose.hpp"
11 #include "rsFileClose.hpp"
12 
13 int
14 rsStreamClose( rsComm_t *rsComm, fileCloseInp_t *streamCloseInp ) {
15  int fileInx = streamCloseInp->fileInx;
16  int status;
17 
18  if ( fileInx < 3 || fileInx >= NUM_FILE_DESC ) {
20  "rsStreamClose: fileInx %d out of range", fileInx );
22  }
23  if ( FileDesc[fileInx].inuseFlag != FD_INUSE ) {
25  }
26 
27  if ( FileDesc[fileInx].fileName == NULL ) {
28  return SYS_INVALID_FILE_PATH;
29  }
30  if ( strcmp( FileDesc[fileInx].fileName, STREAM_FILE_NAME ) != 0 ) {
32  "rsStreamClose: fileName %s is invalid for stream",
33  FileDesc[fileInx].fileName );
34  return SYS_INVALID_FILE_PATH;
35  }
36  status = rsFileClose( rsComm, streamCloseInp );
37 
38  return status;
39 }
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
NULL
#define NULL
Definition: rodsDef.h:70
rsComm_t
Definition: rcConnect.h:145
streamClose.h
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
rsStreamClose.hpp
SYS_BAD_FILE_DESCRIPTOR
@ SYS_BAD_FILE_DESCRIPTOR
Definition: rodsErrorTable.h:91
rsFileClose.hpp
FileCloseInp
Definition: fileClose.h:6
rsGlobalExtern.hpp
FileCloseInp::fileInx
int fileInx
Definition: fileClose.h:7
rsStreamClose
int rsStreamClose(rsComm_t *rsComm, fileCloseInp_t *streamCloseInp)
Definition: rsStreamClose.cpp:14
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
rsFileClose
int rsFileClose(rsComm_t *rsComm, fileCloseInp_t *fileCloseInp)
Definition: rsFileClose.cpp:18
miscServerFunct.hpp
SYS_INVALID_FILE_PATH
@ SYS_INVALID_FILE_PATH
Definition: rodsErrorTable.h:99
FD_INUSE
#define FD_INUSE
Definition: fileOpr.hpp:21
FileDesc
fileDesc_t FileDesc[1026]
Definition: irods_server_globals.cpp:28
STREAM_FILE_NAME
#define STREAM_FILE_NAME
Definition: fileOpr.hpp:23
NUM_FILE_DESC
#define NUM_FILE_DESC
Definition: fileOpr.hpp:16
SYS_FILE_DESC_OUT_OF_RANGE
@ SYS_FILE_DESC_OUT_OF_RANGE
Definition: rodsErrorTable.h:87