• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ rodsLogError函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中rodsLogError函数的典型用法代码示例。如果您正苦于以下问题:C++ rodsLogError函数的具体用法?C++ rodsLogError怎么用?C++ rodsLogError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了rodsLogError函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: bulkPutDirUtil

int
bulkPutDirUtil( rcComm_t **myConn, char *srcDir, char *targColl,
                rodsEnv *myRodsEnv, rodsArguments_t *rodsArgs, dataObjInp_t *dataObjOprInp,
                bulkOprInp_t *bulkOprInp, rodsRestart_t *rodsRestart ) {
    int status;
    bulkOprInfo_t bulkOprInfo;

    /* do large files first */
    bzero( &bulkOprInfo, sizeof( bulkOprInfo ) );
    bulkOprInfo.flags = BULK_OPR_LARGE_FILES;

    status = putDirUtil( myConn, srcDir, targColl, myRodsEnv, rodsArgs,
                         dataObjOprInp, bulkOprInp, rodsRestart, &bulkOprInfo );

    if ( status < 0 ) {
        rodsLogError( LOG_ERROR, status,
                      "bulkPutDirUtil: Large files bulkPut error for %s", srcDir );
        return status;
    }

    /* now bulk put the small files */
    bzero( &bulkOprInfo, sizeof( bulkOprInfo ) );
    bulkOprInfo.flags = BULK_OPR_SMALL_FILES;
    rstrcpy( dataObjOprInp->objPath, targColl, MAX_NAME_LEN );
    rstrcpy( bulkOprInp->objPath, targColl, MAX_NAME_LEN );
    bulkOprInfo.bytesBuf.len = 0;
    bulkOprInfo.bytesBuf.buf = malloc( BULK_OPR_BUF_SIZE );

    status = putDirUtil( myConn, srcDir, targColl, myRodsEnv, rodsArgs,
                         dataObjOprInp, bulkOprInp, rodsRestart, &bulkOprInfo );

    if ( status < 0 ) {
        rodsLogError( LOG_ERROR, status,
                      "bulkPutDirUtil: Small files bulkPut error for %s", srcDir );
        return status;
    }

    if ( bulkOprInfo.count > 0 ) {
        status = sendBulkPut( *myConn, bulkOprInp, &bulkOprInfo, rodsArgs );
        if ( status >= 0 ) {
            if ( rodsRestart->fd > 0 ) {
                rodsRestart->curCnt += bulkOprInfo.count;
                /* last entry. */
                writeRestartFile( rodsRestart, bulkOprInfo.cachedTargPath );
            }
        }
        else {
            rodsLogError( LOG_ERROR, status,
                          "bulkPutDirUtil: tarAndBulkPut error for %s",
                          bulkOprInfo.phyBunDir );
        }
        clearBulkOprInfo( &bulkOprInfo );
        if ( bulkOprInfo.bytesBuf.buf != NULL ) {
            free( bulkOprInfo.bytesBuf.buf );
            bulkOprInfo.bytesBuf.buf = NULL;
        }

    }
    return status;
}
开发者ID:hurngchunlee,项目名称:irods,代码行数:60,代码来源:putUtil.cpp


示例2: irods_file_open_

int irods_file_open_( char *filename, char *mode ) {
    int i;
    int status;
    dataObjInp_t dataObjInp;
    char **outPath;
    char *cp1, *cp2;
    int nameLen;

    if ( debug ) {
        printf( "irods_file_open filename input:%s:\n", filename );
    }

    /* Remove trailing blanks from the filename */
    cp1 = filename;
    cp2 = cp1 + strlen( filename ) - 1;
    for ( ; *cp2 == ' ' && cp2 > cp1; cp2-- ) {
    }
    cp2++;
    if ( cp2 > cp1 ) {
        *cp2 = '\0';
    }

    if ( debug ) printf( "irods_file_open filename w/o trailing blanks:%s:\n",
                             filename );

    if ( setupFlag == 0 ) {
        status = irods_connect_();
        if ( status ) {
            return -1;
        }
    }

    memset( &dataObjInp, 0, sizeof( dataObjInp ) );
    status = parseRodsPathStr( filename , &myRodsEnv,
                               dataObjInp.objPath );
    if ( status < 0 ) {
        rodsLogError( LOG_ERROR, status, "irods_file_open" );
        return -1;
    }

    /* Set the openFlags based on the input mode (incomplete
     * currently) // */
    dataObjInp.openFlags = O_RDONLY;
    if ( strstr( mode, "WRITE" ) != NULL ) {
        dataObjInp.openFlags = O_RDWR;
    }
    /* may want a O_WRONLY mode too sometime */

    status = rcDataObjOpen( Comm, &dataObjInp );

    if ( status == CAT_NO_ROWS_FOUND &&
            dataObjInp.openFlags == O_WRONLY ) {
        status = rcDataObjCreate( Comm, &dataObjInp );
    }
    if ( status < 0 ) {
        rodsLogError( LOG_ERROR, status, "irods_file_open" );
        return -1;
    }
    return status;
}
开发者ID:dthain,项目名称:irods,代码行数:60,代码来源:fortran_io.cpp


示例3: ifuseClose

/* close a iFuse file */
int
ifuseClose (iFuseDesc_t *desc)
{
	int status;

    LOCK_STRUCT(*desc);

	status = _ifuseFlush(desc);
	if(status < 0) {
		rodsLogError(LOG_ERROR, status, "ifuseClose: flush of %s error",
				desc->localPath);

	}
	status = ifuseFileCacheClose(desc->fileCache);
	if(status < 0) {
		rodsLogError(LOG_ERROR, status, "ifuseClose: close of %s error",
				desc->localPath);

	}
	status = _freeIFuseDesc(desc);

	UNLOCK_STRUCT(*desc);
	if(status < 0) {
		rodsLogError(LOG_ERROR, status, "ifuseClose: free desc struct error",
				desc->localPath);

	}

	return status;
}
开发者ID:brainstorm,项目名称:irods-legacy,代码行数:31,代码来源:iFuseLib.Desc.c


示例4: rsAcceptConn

int
rsAcceptConn( rsComm_t *svrComm ) {
    socklen_t len = sizeof( svrComm->remoteAddr );

    const int saved_socket_flags = fcntl( svrComm->sock, F_GETFL );
    int status = fcntl( svrComm->sock, F_SETFL, saved_socket_flags | O_NONBLOCK );
    if ( status < 0 ) {
        rodsLogError( LOG_NOTICE, status, "failed to set flags with nonblock on fnctl with status %d", status );
    }
    const int newSock = accept( svrComm->sock, ( struct sockaddr * ) &svrComm->remoteAddr, &len );
    status = fcntl( svrComm->sock, F_SETFL, saved_socket_flags );
    if ( status < 0 ) {
        rodsLogError( LOG_NOTICE, status, "failed to revert flags on fnctl with status %d", status );
    }

    if ( newSock < 0 ) {
        const int status = SYS_SOCK_ACCEPT_ERR - errno;
        rodsLogError( LOG_NOTICE, status,
                      "rsAcceptConn: accept error for socket %d, status = %d",
                      svrComm->sock, status );
        return newSock;
    }
    rodsSetSockOpt( newSock, svrComm->windowSize );

    return newSock;
}
开发者ID:hurngchunlee,项目名称:irods,代码行数:26,代码来源:sockComm.cpp


示例5: renamePreloadedCache

int
renamePreloadedCache (const char *fromPath, const char *toPath) {
    int status;
    char fromiRODSPath[MAX_NAME_LEN];
    char toiRODSPath[MAX_NAME_LEN];

    status = _getiRODSPath(fromPath, fromiRODSPath);
    if(status < 0) {
        rodsLogError(LOG_ERROR, status, "renamePreloadedCache: _getiRODSPath error.");
        rodsLog (LOG_ERROR, "renamePreloadedCache: failed to get iRODS path - %s", fromPath);
        return status;
    }

    status = _getiRODSPath(toPath, toiRODSPath);
    if(status < 0) {
        rodsLogError(LOG_ERROR, status, "renamePreloadedCache: _getiRODSPath error.");
        rodsLog (LOG_ERROR, "renamePreloadedCache: failed to get iRODS path - %s", toPath);
        return status;
    }

    LOCK(PreloadLock);

    status = _renameCache(fromiRODSPath, toiRODSPath);

    UNLOCK(PreloadLock);

    return status;
}
开发者ID:DICE-UNC,项目名称:iRODS-FUSE-Mod,代码行数:28,代码来源:iFuseLib.Preload.c


示例6: mvUtil

int
mvUtil( rcComm_t *conn, rodsArguments_t *myRodsArgs, rodsPathInp_t *rodsPathInp ) {
    if ( rodsPathInp == NULL ) {
        return USER__NULL_INPUT_ERR;
    }

    dataObjCopyInp_t dataObjRenameInp;
    initCondForMv( &dataObjRenameInp );

    int savedStatus = resolveRodsTarget( conn, rodsPathInp, MOVE_OPR );
    if ( savedStatus < 0 ) {
        rodsLogError( LOG_ERROR, savedStatus,
                      "mvUtil: resolveRodsTarget error, status = %d", savedStatus );
        return savedStatus;
    }

    for ( int i = 0; i < rodsPathInp->numSrc; i++ ) {
        rodsPath_t * targPath = &rodsPathInp->targPath[i];

        int status = mvObjUtil( conn, rodsPathInp->srcPath[i].outPath,
                                targPath->outPath, targPath->objType, myRodsArgs,
                                &dataObjRenameInp );

        /* XXXX may need to return a global status */
        if ( status < 0 &&
                status != CAT_NO_ROWS_FOUND ) {
            rodsLogError( LOG_ERROR, status,
                          "mvUtil: mv error for %s, status = %d",
                          targPath->outPath, status );
            savedStatus = status;
        }
    }
    return savedStatus;
}
开发者ID:bpow,项目名称:irods,代码行数:34,代码来源:mvUtil.cpp


示例7: _completeDownload

static int
_completeDownload(const char *workPath, const char *cachePath, struct stat *stbuf) {
    int status;
    struct utimbuf amtime;

    if (workPath == NULL || cachePath == NULL || stbuf == NULL) {
        rodsLog (LOG_ERROR, "_completeDownload: input workPath or cachePath or stbuf is NULL");
        return (SYS_INTERNAL_NULL_INPUT_ERR);
    }

    //amtime.actime = stbuf->st_atime;
    amtime.actime = convTime(getCurrentTime());
    amtime.modtime = stbuf->st_mtime;

    // set last access time and modified time the same as the original file
    status = utime(workPath, &amtime);
    if(status < 0) {
        rodsLogError(LOG_ERROR, status, "_completeDownload: utime error.");
        return status;
    }

    // change the name
    status = rename(workPath, cachePath);
    if(status < 0) {
        rodsLogError(LOG_ERROR, status, "_completeDownload: rename error.");
        return status;
    }

    return (0);
}
开发者ID:DICE-UNC,项目名称:iRODS-FUSE-Mod,代码行数:30,代码来源:iFuseLib.Preload.c


示例8: moveToPreloadedDir

int
moveToPreloadedDir (const char *path, const char *iRODSPath) {
    int status;
    char preloadCachePath[MAX_NAME_LEN];

    if (path == NULL || iRODSPath == NULL) {
        rodsLog (LOG_ERROR, "moveToPreloadedDir: input path or iRODSPath is NULL");
        return (SYS_INTERNAL_NULL_INPUT_ERR);
    }

    status = _getCachePath(iRODSPath, preloadCachePath);
    if(status < 0) {
        rodsLogError(LOG_ERROR, status, "moveToPreloadedDir: _getCachePath error.");
        rodsLog (LOG_ERROR, "moveToPreloadedDir: failed to get cache path - %s", path);
        return status;
    }

    // make dir
    prepareDir(preloadCachePath);
    
    // move the file
    status = rename(path, preloadCachePath);
    if(status < 0) {
        rodsLogError(LOG_ERROR, status, "moveToPreloadedDir: rename error.");
        return status;
    }

    return (0);
}
开发者ID:DICE-UNC,项目名称:iRODS-FUSE-Mod,代码行数:29,代码来源:iFuseLib.Preload.c


示例9: regUtil

int
regUtil( rcComm_t *conn, rodsEnv *myRodsEnv, rodsArguments_t *myRodsArgs,
         rodsPathInp_t *rodsPathInp ) {
    if ( rodsPathInp == NULL ) {
        return USER__NULL_INPUT_ERR;
    }

    dataObjInp_t dataObjOprInp;
    initCondForReg( myRodsEnv, myRodsArgs, &dataObjOprInp );

    int savedStatus = 0;
    for ( int i = 0; i < rodsPathInp->numSrc; i++ ) {
        rodsPath_t * destPath = &rodsPathInp->destPath[i];	/* iRODS path */
        rodsPath_t * srcPath = &rodsPathInp->srcPath[i];	/* file Path */

        getRodsObjType( conn, destPath );

        if ( destPath->objState == EXIST_ST &&
                myRodsArgs->force == False &&
                myRodsArgs->mountCollection == False &&
                myRodsArgs->regRepl != True ) {
            rodsLog( LOG_ERROR,
                     "regUtil: iRODSPath %s already exist", destPath->outPath );
            return CAT_NAME_EXISTS_AS_DATAOBJ;
        }

        int status = 0;
        if ( myRodsArgs->collection == False && myRodsArgs->checksum == True ) {
            status = rcChksumLocFile( srcPath->outPath,
                                      REG_CHKSUM_KW,
                                      &dataObjOprInp.condInput,
                                      myRodsArgs->hashValue );
            if ( status < 0 ) {
                rodsLogError( LOG_ERROR, status,
                              "regUtil: rcChksumLocFile error for %s, status = %d",
                              srcPath, status );
                return status;
            }
        }
        else if ( myRodsArgs->collection == False && myRodsArgs->verifyChecksum == True ) {
            addKeyVal( &dataObjOprInp.condInput, VERIFY_CHKSUM_KW, "" );
        }

        addKeyVal( &dataObjOprInp.condInput, FILE_PATH_KW, srcPath->outPath );
        rstrcpy( dataObjOprInp.objPath, destPath->outPath, MAX_NAME_LEN );

        status = rcPhyPathReg( conn, &dataObjOprInp );

        /* XXXX may need to return a global status */
        if ( status < 0 &&
                status != CAT_NO_ROWS_FOUND ) {
            rodsLogError( LOG_ERROR, status,
                          "regUtil: reg error for %s, status = %d",
                          destPath->outPath, status );
            savedStatus = status;
        }
    }
    return savedStatus;
}
开发者ID:cchapati,项目名称:irods,代码行数:59,代码来源:regUtil.cpp


示例10: irodsTruncate

int
irodsTruncate (const char *path, off_t size)
{
    dataObjInp_t dataObjInp;
    int status;
    pathCache_t *tmpPathCache;
    iFuseConn_t *iFuseConn = NULL;

    rodsLog (LOG_DEBUG, "irodsTruncate: %s", path);

    if (matchAndLockPathCache ((char *) path, &tmpPathCache) == 1) {
        if(tmpPathCache->fileCache != NULL) {
            LOCK_STRUCT(*tmpPathCache->fileCache);
            if(tmpPathCache->fileCache->state == HAVE_NEWLY_CREATED_CACHE) {
                status = truncate (tmpPathCache->fileCache->fileCachePath, size);
                if (status >= 0) {
                    updatePathCacheStatFromFileCache (tmpPathCache);
                    UNLOCK_STRUCT(*(tmpPathCache->fileCache));
                    UNLOCK_STRUCT(*tmpPathCache);
                    return (0);
                }
            }
            UNLOCK_STRUCT(*(tmpPathCache->fileCache));
        }

    }
    UNLOCK_STRUCT(*tmpPathCache);


    memset (&dataObjInp, 0, sizeof (dataObjInp));
    status = parseRodsPathStr ((char *) (path + 1) , &MyRodsEnv, dataObjInp.objPath);
    if (status < 0) {
        rodsLogError (LOG_ERROR, status, "irodsTruncate: parseRodsPathStr of %s error", path);
        /* use ENOTDIR for this type of error */
        return -ENOTDIR;
    }

    dataObjInp.dataSize = size;

    getAndUseIFuseConn (&iFuseConn, &MyRodsEnv);
    RECONNECT_IF_NECESSARY(status, iFuseConn, rcDataObjTruncate (iFuseConn->conn, &dataObjInp));
    if (status >= 0) {
        pathCache_t *tmpPathCache;

        if (matchAndLockPathCache ((char *) path, &tmpPathCache) == 1) {
            tmpPathCache->stbuf.st_size = size;
        }
        UNLOCK_STRUCT(*tmpPathCache);
        status = 0;
    } else {
        rodsLogError (LOG_ERROR, status,
                      "irodsTruncate: rcDataObjTruncate of %s error", path);
        status = -ENOENT;
    }
    unuseIFuseConn (iFuseConn);

    return (status);
}
开发者ID:irods,项目名称:irods-legacy,代码行数:58,代码来源:iFuseOper.c


示例11: rcExecMyRule

/**
 * \fn rcExecMyRule( rcComm_t *conn, execMyRuleInp_t *execMyRuleInp, msParamArray_t **outParamArray )
 *
 * \brief Execute my rule.
 *
 * \user client
 *
 * \ingroup rules
 *
 * \since 1.0
 *
 *
 * \remark none
 *
 * \note none
*
 * \param[in] conn - A rcComm_t connection handle to the server.
 * \param[in] execMyRuleInp
 * \param[out] outParamArray
 *
 * \return integer
 * \retval 0 on success.
 * \sideeffect none
 * \pre none
 * \post none
 * \sa none
**/
int
rcExecMyRule( rcComm_t *conn, execMyRuleInp_t *execMyRuleInp,
              msParamArray_t **outParamArray ) {

    int status = procApiRequest( conn, EXEC_MY_RULE_AN, execMyRuleInp, NULL,
                                 ( void ** )outParamArray, NULL );

    while ( status == SYS_SVR_TO_CLI_MSI_REQUEST ) {
        /* it is a server request */
        msParam_t *myParam = NULL, *putParam = NULL;

        if ( ( myParam = putParam = getMsParamByLabel( *outParamArray, CL_PUT_ACTION ) ) ||
                ( myParam = getMsParamByLabel( *outParamArray, CL_GET_ACTION ) ) ) {
            //putParam is non-null if it's a put, null if it's a get
            dataObjInp_t * dataObjInp = ( dataObjInp_t * ) myParam->inOutStruct;
            char * locFilePath;
            char myDir[MAX_NAME_LEN], myFile[MAX_NAME_LEN];
            // locFilePath should be the return of getValByKey if it exists,
            // otherwise use the filename from splitPathByKey
            if ( ( locFilePath = getValByKey( &dataObjInp->condInput, LOCAL_PATH_KW ) ) ||
                    ( ( status = splitPathByKey( dataObjInp->objPath, myDir, MAX_NAME_LEN, myFile, MAX_NAME_LEN, '/' ) ) >= 0 &&
                      ( locFilePath = ( char * ) myFile ) ) ) {
                status = putParam ?
                         rcDataObjPut( conn, dataObjInp, locFilePath ) :
                         rcDataObjGet( conn, dataObjInp, locFilePath );
                rcOprComplete( conn, status );
            }
            else {
                rodsLogError( LOG_ERROR, status,
                              "rcExecMyRule: splitPathByKey for %s error",
                              dataObjInp->objPath );
                rcOprComplete( conn, USER_FILE_DOES_NOT_EXIST );
            }
            clearKeyVal( &dataObjInp->condInput );
        }
        else {
            rcOprComplete( conn, SYS_SVR_TO_CLI_MSI_NO_EXIST );
        }
        /* free outParamArray */
        clearMsParamArray( *outParamArray, 1 );
        free( *outParamArray );
        *outParamArray = NULL;

        /* read the reply from the earlier call */

        status = branchReadAndProcApiReply( conn, EXEC_MY_RULE_AN,
                                            ( void ** )outParamArray, NULL );
        if ( status < 0 ) {
            rodsLogError( LOG_DEBUG, status,
                          "rcExecMyRule: readAndProcApiReply failed. status = %d",
                          status );
        }
    }

    return status;
}
开发者ID:hurngchunlee,项目名称:irods,代码行数:83,代码来源:rcExecMyRule.cpp


示例12: phybunUtil

int
phybunUtil (rcComm_t *conn, rodsEnv *myRodsEnv, rodsArguments_t *myRodsArgs,
rodsPathInp_t *rodsPathInp)
{
    int i;
    int status; 
    int savedStatus = 0;
    rodsPath_t *collPath;
    structFileExtAndRegInp_t phyBundleCollInp;

    if (rodsPathInp == NULL) {
	return (USER__NULL_INPUT_ERR);
    }

    status = initCondForPhybunOpr (myRodsEnv, myRodsArgs, &phyBundleCollInp, 
      rodsPathInp);

    if (status < 0) return status;
    
    for (i = 0; i < rodsPathInp->numSrc; i++) {
        collPath = &rodsPathInp->srcPath[i];	/* iRODS Collection */

        getRodsObjType (conn, collPath);

	if (collPath->objType !=  COLL_OBJ_T) {
	    rodsLogError (LOG_ERROR, status,
             "phybunUtil: input path %s is not a collection", 
	      collPath->outPath);
	    return USER_INPUT_PATH_ERR;
	}

	rstrcpy (phyBundleCollInp.collection, collPath->outPath,
	  MAX_NAME_LEN);

	status = rcPhyBundleColl (conn, &phyBundleCollInp);

	if (status < 0) {
	    rodsLogError (LOG_ERROR, status,
             "phybunUtil: opr error for %s, status = %d", 
	      collPath->outPath, status);
            savedStatus = status;
	} 
    }

    if (savedStatus < 0) {
        return (savedStatus);
    } else if (status == CAT_NO_ROWS_FOUND) {
        return (0);
    } else {
        return (status);
    }
}
开发者ID:UPPMAX,项目名称:irods,代码行数:52,代码来源:phybunUtil.c


示例13: irods_file_create_

int irods_file_create_( char *filename ) {
    int i;
    int status;
    dataObjInp_t dataObjInp;
    char **outPath;
    char *cp1, *cp2;
    int nameLen;

    if ( debug ) {
        printf( "irods_file_create filename input:%s:\n", filename );
    }

    /* Remove trailing blanks from the filename */
    cp1 = filename;
    cp2 = cp1 + strlen( filename ) - 1;
    for ( ; *cp2 == ' ' && cp2 > cp1; cp2-- ) {
    }
    cp2++;
    if ( cp2 > cp1 ) {
        *cp2 = '\0';
    }

    if ( debug ) printf( "irods_file_create filename w/o trailing blanks:%s:\n",
                             filename );

    if ( setupFlag == 0 ) {
        status = irods_connect_();
        if ( status ) {
            return -1;
        }
    }

    memset( &dataObjInp, 0, sizeof( dataObjInp ) );
    status = parseRodsPathStr( filename , &myRodsEnv,
                               dataObjInp.objPath );
    if ( status < 0 ) {
        rodsLogError( LOG_ERROR, status, "irods_file_create" );
        return -1;
    }

    dataObjInp.openFlags = O_RDWR;
    /* may want a O_WRONLY mode too sometime */

    status = rcDataObjCreate( Comm, &dataObjInp );

    if ( status < 0 ) {
        rodsLogError( LOG_ERROR, status, "irods_file_open" );
        return -1;
    }
    return status;
}
开发者ID:dthain,项目名称:irods,代码行数:51,代码来源:fortran_io.cpp


示例14: procDataObjOpenForWrite

// =-=-=-=-=-=-=-
// JMC - backport 4590
int
procDataObjOpenForWrite( rsComm_t *rsComm, dataObjInp_t *dataObjInp,
                         dataObjInfo_t **dataObjInfoHead,
                         dataObjInfo_t **compDataObjInfo ) {
    int status = 0;

    /* put the copy with destResc on top */
    status = requeDataObjInfoByDestResc( dataObjInfoHead, &dataObjInp->condInput, 1, 1 );

    /* status < 0 means there is no copy in the DEST_RESC */
    if ( status < 0 && ( *dataObjInfoHead )->specColl == NULL &&
            getValByKey( &dataObjInp->condInput, DEST_RESC_NAME_KW ) != NULL ) {

        /* we don't have a copy, so create an empty dataObjInfo */
        status = createEmptyRepl( rsComm, dataObjInp, dataObjInfoHead );
        if ( status < 0 ) {
            rodsLogError( LOG_ERROR, status,
                          "procDataObjForOpenWrite: createEmptyRepl of %s failed",
                          ( *dataObjInfoHead )->objPath );
            return status;
        }

    }
    else {     /*  The target data object exists */
        status = 0;
    }

    if ( *compDataObjInfo != NULL ) {
        dequeDataObjInfo( dataObjInfoHead, *compDataObjInfo );
    }
    return status;
}
开发者ID:QuarkDoe,项目名称:irods,代码行数:34,代码来源:rsDataObjOpen.cpp


示例15: ifuseConnect

int
ifuseConnect( iFuseConn_t *iFuseConn, rodsEnv *myRodsEnv ) {
    int status = 0;
    LOCK_STRUCT( *iFuseConn );
    if ( iFuseConn->conn == NULL ) {
        rErrMsg_t errMsg;
        iFuseConn->conn = rcConnect( myRodsEnv->rodsHost, myRodsEnv->rodsPort,
                                     myRodsEnv->rodsUserName, myRodsEnv->rodsZone, NO_RECONN, &errMsg );

        if ( iFuseConn->conn == NULL ) {
            /* try one more */
            iFuseConn->conn = rcConnect( myRodsEnv->rodsHost, myRodsEnv->rodsPort,
                                         myRodsEnv->rodsUserName, myRodsEnv->rodsZone, NO_RECONN, &errMsg );
            if ( iFuseConn->conn == NULL ) {
                rodsLogError( LOG_ERROR, errMsg.status,
                              "ifuseConnect: rcConnect failure %s", errMsg.msg );
                UNLOCK_STRUCT( *iFuseConn );
                if ( errMsg.status < 0 ) {
                    return errMsg.status;
                }
                else {
                    return -1;
                }
            }
        }

        status = clientLogin( iFuseConn->conn );
        if ( status != 0 ) {
            rcDisconnect( iFuseConn->conn );
            iFuseConn->conn = NULL;
        }
    }
    UNLOCK_STRUCT( *iFuseConn );
    return status;
}
开发者ID:dthain,项目名称:irods,代码行数:35,代码来源:iFuseLib.Conn.cpp


示例16: isioSetup

int
isioSetup() {
   int status;
   rErrMsg_t errMsg;
   char *mySubName;
   char *myName;

   if (debug) printf("isioSetup\n");

   status = getRodsEnv (&myRodsEnv);
   if (status < 0) {
      rodsLogError(LOG_ERROR, status, "isioSetup: getRodsEnv error.");
   }
   Comm = rcConnect (myRodsEnv.rodsHost, myRodsEnv.rodsPort, 
		     myRodsEnv.rodsUserName,
                     myRodsEnv.rodsZone, 0, &errMsg);

   if (Comm == NULL) {
      myName = rodsErrorName(errMsg.status, &mySubName);
      rodsLog(LOG_ERROR, "rcConnect failure %s (%s) (%d) %s",
	      myName,
	      mySubName,
	      errMsg.status,
	      errMsg.msg);
      status = errMsg.status;
      return(status);
   }

   status = clientLogin(Comm);
   if (status==0) {
      setupFlag=1;
   }
   return(status);
}
开发者ID:navin619,项目名称:irods_command,代码行数:34,代码来源:t3.c


示例17: irods_file_seek_

int
irods_file_seek_( int *fd, long *offset, char *whence ) {
    openedDataObjInp_t seekParam;
    fileLseekOut_t* seekResult = NULL;
    int status;
    int myWhence = 0;
    if ( strstr( whence, "SEEK_SET" ) != NULL ) {
        myWhence = SEEK_SET;
    }
    if ( strstr( whence, "SEEK_CUR" ) != NULL ) {
        myWhence = SEEK_CUR;
    }
    if ( strstr( whence, "SEEK_END" ) != NULL ) {
        myWhence = SEEK_END;
    }

    if ( debug ) {
        printf( "irods_file_seek_: %d\n", *fd );
    }
    memset( &seekParam,  0, sizeof( openedDataObjInp_t ) );
    seekParam.l1descInx = *fd;
    seekParam.offset  = *offset;
    seekParam.whence  = myWhence;
    status = rcDataObjLseek( Comm, &seekParam, &seekResult );
    if ( status < 0 ) {
        rodsLogError( LOG_ERROR, status, "irods_file_seek_" );
    }
    return status;
}
开发者ID:dthain,项目名称:irods,代码行数:29,代码来源:fortran_io.cpp


示例18: doModComment

/* perform the modify command to change the comment*/
int 
doModComment(rcComm_t *Conn, char *objPath, int numRepl, char *theComment) {
   int status;

   modDataObjMeta_t modDataObjMetaInp;
   keyValPair_t regParam;
   dataObjInfo_t dataObjInfo;

   memset (&regParam, 0, sizeof (regParam));
   addKeyVal (&regParam, DATA_COMMENTS_KW, theComment);

   memset(&dataObjInfo, 0, sizeof(dataObjInfo));
   rstrcpy(dataObjInfo.objPath, objPath, MAX_NAME_LEN);

   if (numRepl > 0) {
     dataObjInfo.replNum = numRepl;
   }
   else {
     addKeyVal(&regParam, ALL_KW, theComment);
   }

   modDataObjMetaInp.regParam = &regParam;
   modDataObjMetaInp.dataObjInfo = &dataObjInfo;

   status = rcModDataObjMeta(Conn, &modDataObjMetaInp);
   if (status) {
      rodsLogError(LOG_ERROR, status, "rcModDataObjMeta failure");
   }
   return(status);
}
开发者ID:DICE-UNC,项目名称:iRODS-FUSE-Mod,代码行数:31,代码来源:isysmeta.c


示例19: branchReadAndProcApiReply

int
branchReadAndProcApiReply( rcComm_t *conn, int apiNumber,
                           void **outStruct, bytesBuf_t *outBsBBuf ) {
    int status = 0;
    int apiInx = 0;

    if ( conn == NULL ) {
        return ( USER__NULL_INPUT_ERR );
    }

    apiInx = apiTableLookup( apiNumber );
    if ( apiInx < 0 ) {
        rodsLog( LOG_ERROR,
                 "branchReadAndProcApiReply: apiTableLookup of apiNum %d failed",
                 apiNumber );
        return ( apiInx );
    }

    conn->apiInx = apiInx;

    status = readAndProcApiReply( conn, apiInx, outStruct, outBsBBuf );
    if ( status < 0 ) {
        rodsLogError( LOG_DEBUG, status,
                      "branchReadAndProcApiReply: readAndProcApiReply failed. status = %d",
                      status );
    }
    return ( status );
}
开发者ID:PlantandFoodResearch,项目名称:irods,代码行数:28,代码来源:procApiRequest.cpp


示例20: chksumDataObjUtil

int
chksumDataObjUtil (rcComm_t *conn, char *srcPath, 
rodsEnv *myRodsEnv, rodsArguments_t *rodsArgs, 
dataObjInp_t *dataObjInp)
{
    int status;
    struct timeval startTime, endTime;
    char *chksumStr = NULL;
    char myDir[MAX_NAME_LEN], myFile[MAX_NAME_LEN];
 
    if (srcPath == NULL) {

       rodsLog (LOG_ERROR,
          "chksumDataObjUtil: NULL srcPath input");
        return (USER__NULL_INPUT_ERR);
    }

    if (rodsArgs->verbose == True) {
        (void) gettimeofday(&startTime, (struct timezone *)0);
    }

    rstrcpy (dataObjInp->objPath, srcPath, MAX_NAME_LEN);

    status = rcDataObjChksum (conn, dataObjInp, &chksumStr);

    if (status < 0) {
#if 0
	if (status == CAT_NO_ROWS_FOUND && rodsArgs->resource == True) {
	    if (rodsArgs->verbose == True) {
		printf ("%s does not exist in resource %s\n",
		  dataObjInp->objPath, rodsArgs->resourceString);
	    }
	    return 0;
	} else {
#endif
	    ChksumCnt++;
	    FailedChksumCnt++;
	    rodsLogError (LOG_ERROR, status,
	     "chksumDataObjUtil: rcDataObjChksum error for %s",
	     dataObjInp->objPath);
	    return status;
#if 0
	}
#endif
    } else {
	ChksumCnt++;
    }
    splitPathByKey (dataObjInp->objPath, myDir, myFile, '/');
    if (rodsArgs->silent == False) {
        printf ("    %-30.30s    %s\n", myFile, chksumStr);
        free (chksumStr);     
        if (rodsArgs->verbose == True) {
            (void) gettimeofday(&endTime, (struct timezone *)0);
            printTiming (conn, dataObjInp->objPath, -1, NULL,
             &startTime, &endTime);
	}
    }

    return (status);
}
开发者ID:DICE-UNC,项目名称:iRODS-FUSE-Mod,代码行数:60,代码来源:chksumUtil.c



注:本文中的rodsLogError函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ roi函数代码示例发布时间:2022-05-30
下一篇:
C++ rodsLog函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap