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)  

rsStreamRead.cpp
Go to the documentation of this file.
1 
3 /* rsFileRead.c - server routine that handles the fileRead
4  * API
5  */
6 
7 #include "fileRead.h"
8 #include "fileClose.h"
9 #include "streamRead.h"
10 #include "miscServerFunct.hpp"
11 #include "rsGlobalExtern.hpp"
12 #include "rsStreamRead.hpp"
13 #include "rsFileRead.hpp"
14 
15 int
16 rsStreamRead( rsComm_t *rsComm, fileReadInp_t *streamReadInp,
17  bytesBuf_t *streamReadOutBBuf ) {
18  int fileInx = streamReadInp->fileInx;
19  int status;
20 
21  if ( fileInx < 3 || fileInx >= NUM_FILE_DESC ) {
23  "rsStreamRead: fileInx %d out of range", fileInx );
25  }
26  if ( FileDesc[fileInx].inuseFlag != FD_INUSE ) {
28  }
29 
30  if ( FileDesc[fileInx].fileName == NULL ) {
31  return SYS_INVALID_FILE_PATH;
32  }
33  if ( strcmp( FileDesc[fileInx].fileName, STREAM_FILE_NAME ) != 0 ) {
35  "rsStreamRead: fileName %s is invalid for stream",
36  FileDesc[fileInx].fileName );
37  return SYS_INVALID_FILE_PATH;
38  }
39  status = rsFileRead( rsComm, streamReadInp, streamReadOutBBuf );
40 
41  return status;
42 }
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
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
SYS_BAD_FILE_DESCRIPTOR
@ SYS_BAD_FILE_DESCRIPTOR
Definition: rodsErrorTable.h:91
fileClose.h
fileRead.h
rsGlobalExtern.hpp
FileReadInp
Definition: fileRead.h:7
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
BytesBuf
Definition: rodsDef.h:197
FileReadInp::fileInx
int fileInx
Definition: fileRead.h:8
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
rsFileRead.hpp
STREAM_FILE_NAME
#define STREAM_FILE_NAME
Definition: fileOpr.hpp:23
rsFileRead
int rsFileRead(rsComm_t *rsComm, fileReadInp_t *fileReadInp, bytesBuf_t *fileReadOutBBuf)
Definition: rsFileRead.cpp:19
streamRead.h
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
rsStreamRead.hpp
rsStreamRead
int rsStreamRead(rsComm_t *rsComm, fileReadInp_t *streamReadInp, bytesBuf_t *streamReadOutBBuf)
Definition: rsStreamRead.cpp:16