00001
00002
00003
00004
00005
00006 #include "generalUpdate.h"
00007 #include "reGlobalsExtern.h"
00008 #include "icatHighLevelRoutines.h"
00009
00010 int
00011 rsGeneralUpdate (rsComm_t *rsComm, generalUpdateInp_t *generalUpdateInp )
00012 {
00013 rodsServerHost_t *rodsServerHost;
00014 int status;
00015
00016 rodsLog(LOG_DEBUG, "generalUpdate");
00017
00018 status = getAndConnRcatHost(rsComm, MASTER_RCAT, NULL, &rodsServerHost);
00019 if (status < 0) {
00020 return(status);
00021 }
00022
00023 if (rodsServerHost->localFlag == LOCAL_HOST) {
00024 #ifdef RODS_CAT
00025 status = _rsGeneralUpdate (rsComm, generalUpdateInp);
00026 #else
00027 status = SYS_NO_RCAT_SERVER_ERR;
00028 #endif
00029 }
00030 else {
00031 status = rcGeneralUpdate(rodsServerHost->conn,
00032 generalUpdateInp);
00033 }
00034
00035 if (status < 0) {
00036 rodsLog (LOG_NOTICE,
00037 "rsGeneralUpdate: rcGeneralUpdate failed");
00038 }
00039 return (status);
00040 }
00041
00042 #ifdef RODS_CAT
00043 int
00044 _rsGeneralUpdate(rsComm_t *rsComm, generalUpdateInp_t *generalUpdateInp )
00045 {
00046 int status;
00047
00048 status = chlGeneralUpdate(*generalUpdateInp);
00049
00050 return(status);
00051 }
00052 #endif