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)  

rsOprComplete.cpp
Go to the documentation of this file.
1 #include "oprComplete.h"
2 #include "dataObjClose.h"
3 #include "rsGlobalExtern.hpp"
4 #include "rsOprComplete.hpp"
5 #include "rsDataObjClose.hpp"
6 
7 int rsOprComplete( rsComm_t *rsComm, int *retval ) {
8  openedDataObjInp_t dataObjCloseInp;
9 
10  if ( *retval >= 2 ) {
11  int l1descInx = *retval;
12 
13  if ( L1desc[l1descInx].remoteZoneHost != NULL ) {
14  *retval = rcOprComplete( L1desc[l1descInx].remoteZoneHost->conn,
15  L1desc[l1descInx].remoteL1descInx );
16  freeL1desc( l1descInx );
17  }
18  else {
19  memset( &dataObjCloseInp, 0, sizeof( dataObjCloseInp ) );
20  dataObjCloseInp.l1descInx = l1descInx;
21  if ( L1desc[*retval].oprType == PUT_OPR ) {
22  dataObjCloseInp.bytesWritten = L1desc[*retval].dataSize;
23  }
24  *retval = rsDataObjClose( rsComm, &dataObjCloseInp );
25  }
26  }
27 
28  if ( *retval >= 0 ) {
30  }
31  else {
32  return *retval;
33  }
34 }
OpenedDataObjInp
Definition: dataObjInpOut.h:104
L1desc
l1desc_t L1desc[1026]
Definition: irods_server_globals.cpp:29
NULL
#define NULL
Definition: rodsDef.h:70
rsComm_t
Definition: rcConnect.h:145
l1desc::dataSize
rodsLong_t dataSize
Definition: objDesc.hpp:46
OpenedDataObjInp::l1descInx
int l1descInx
Definition: dataObjInpOut.h:105
SYS_HANDLER_DONE_NO_ERROR
@ SYS_HANDLER_DONE_NO_ERROR
Definition: rodsErrorTable.h:878
l1desc::remoteL1descInx
int remoteL1descInx
Definition: objDesc.hpp:52
PUT_OPR
#define PUT_OPR
Definition: dataObjInpOut.h:167
rsOprComplete
int rsOprComplete(rsComm_t *rsComm, int *retval)
Definition: rsOprComplete.cpp:7
rsGlobalExtern.hpp
OpenedDataObjInp::bytesWritten
rodsLong_t bytesWritten
Definition: dataObjInpOut.h:110
rsDataObjClose
int rsDataObjClose(rsComm_t *rsComm, openedDataObjInp_t *dataObjCloseInp)
Definition: rsDataObjClose.cpp:56
rsDataObjClose.hpp
rcOprComplete
int rcOprComplete(rcComm_t *conn, int retval)
Definition: rcOprComplete.cpp:32
dataObjClose.h
rsOprComplete.hpp
oprComplete.h
freeL1desc
int freeL1desc(int l1descInx)
Definition: objDesc.cpp:124