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)  

rsIcatOpr.cpp
Go to the documentation of this file.
1 
4 /* rsIcatOpr.c - misc Icat operation
5  */
6 
7 
8 
9 #include "rsIcatOpr.hpp"
10 #include "rodsConnect.h"
11 #include "rsGlobalExtern.hpp"
13 #include "miscServerFunct.hpp"
14 
15 int
17  int status = 0;
18  rodsServerHost_t *tmpRodsServerHost;
19  int gotRcatHost = 0;
20 
21 
22  if ( IcatConnState == INITIAL_DONE ) {
23  return 0;
24  }
25 
26  /* zone has not been initialized yet. can't use getRcatHost */
27  tmpRodsServerHost = ServerHostHead;
28 
29  while ( tmpRodsServerHost != NULL ) {
30  if ( tmpRodsServerHost->rcatEnabled == LOCAL_ICAT ||
31  tmpRodsServerHost->rcatEnabled == LOCAL_SLAVE_ICAT ) {
32  if ( tmpRodsServerHost->localFlag == LOCAL_HOST ) {
33 
34  status = chlOpen();
35 
36  if ( status < 0 ) {
38  "connectRcat: chlOpen Error. Status = %d", status );
39  }
40  else {
42  gotRcatHost ++;
43  }
44  }
45  else {
46  gotRcatHost ++;
47  }
48  }
49  tmpRodsServerHost = tmpRodsServerHost->next;
50  }
51 
52  if ( gotRcatHost == 0 ) {
53  if ( status >= 0 ) {
55  }
57  "initServerInfo: no rcatHost error, status = %d",
58  status );
59  }
60  else {
61  status = 0;
62  }
63 
64  return status;
65 }
66 
67 int
69  int status;
70 
71  if ( IcatConnState == INITIAL_DONE ) {
72  if ( ( status = chlClose() ) != 0 ) {
74  "initInfoWithRcat: chlClose Error. Status = %d",
75  status );
76  }
78  }
79  else {
80  status = 0;
81  }
82  return status;
83 }
84 
85 int
88  return 0;
89 }
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
LOCAL_ICAT
#define LOCAL_ICAT
Definition: rodsConnect.h:52
NULL
#define NULL
Definition: rodsDef.h:70
connectRcat
int connectRcat()
Definition: rsIcatOpr.cpp:16
rodsServerHost::localFlag
int localFlag
Definition: rodsConnect.h:68
LOG_SYS_FATAL
#define LOG_SYS_FATAL
Definition: rodsLog.h:55
rodsServerHost::rcatEnabled
int rcatEnabled
Definition: rodsConnect.h:65
resetRcat
int resetRcat()
Definition: rsIcatOpr.cpp:86
SYS_NO_ICAT_SERVER_ERR
@ SYS_NO_ICAT_SERVER_ERR
Definition: rodsErrorTable.h:104
INITIAL_NOT_DONE
#define INITIAL_NOT_DONE
Definition: rodsConnect.h:18
ServerHostHead
rodsServerHost_t * ServerHostHead
Definition: irods_server_globals.cpp:21
LOCAL_HOST
#define LOCAL_HOST
Definition: rodsConnect.h:44
LOCAL_SLAVE_ICAT
#define LOCAL_SLAVE_ICAT
Definition: rodsConnect.h:53
rodsServerHost::next
struct rodsServerHost * next
Definition: rodsConnect.h:71
rodsConnect.h
chlClose
int chlClose()
Definition: icatHighLevelRoutines.cpp:164
rsGlobalExtern.hpp
disconnectRcat
int disconnectRcat()
Definition: rsIcatOpr.cpp:68
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
rsIcatOpr.hpp
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
miscServerFunct.hpp
chlOpen
int chlOpen()
Definition: icatHighLevelRoutines.cpp:86
rodsServerHost
Definition: rodsConnect.h:62
icatHighLevelRoutines.hpp
INITIAL_DONE
#define INITIAL_DONE
Definition: rodsConnect.h:19
IcatConnState
int IcatConnState
Definition: irods_server_globals.cpp:47