owping/owping.c
/*
 ** Fetch a session with the given <sid> from the remote server.
 ** It is assumed that control connection has been opened already.
 */
Fetch a session with the given  from the remote server.
It is assumed that control connection has been opened already.
Fetch a session with the given from the remote server . It is assumed that control connection has been opened already .
FILE *
owp_fetch_sid(
        char        *savefile,
        OWPControl    cntrl,
        OWPSID        sid
        )
{
    char        *path = NULL;
    FILE        *fp;
    uint32_t    num_rec;
    OWPErrSeverity    rc=OWPErrOK;
    if(savefile){
        path = savefile;
        if( !(fp = fopen(path,"w+b"))){
            I2ErrLog(eh,"owp_fetch_sid:fopen(%s): %M",path);
            return NULL;
        }
    }
    else if( !(fp = tfile(eh))){
        return NULL;
    }
    num_rec = OWPFetchSession(cntrl,fp,0,(uint32_t)0xFFFFFFFF,sid,&rc);
    if(!num_rec){
        if(path)
            (void)unlink(path);
        if(rc < OWPErrWARNING){
            return NULL;
        }
        I2ErrLog(eh,
                "owp_fetch_sid:Server denied request for to session data - is your clock synchronized via NTP properly?");
        return NULL;
    }
    return fp;
}
FILE * owp_fetch_sid ( char * savefile , OWPControl cntrl , OWPSID sid ) { char * path = NULL ; FILE * fp ; uint32_t num_rec ; OWPErrSeverity rc = OWPErrOK ; if ( savefile ) { path = savefile ; if ( ! ( fp = fopen ( path , " " ) ) ) { I2ErrLog ( eh , " " , path ) ; return NULL ; } } else if ( ! ( fp = tfile ( eh ) ) ) { return NULL ; } num_rec = OWPFetchSession ( cntrl , fp , 0 , ( uint32_t ) 0xFFFFFFFF , sid , & rc ) ; if ( ! num_rec ) { if ( path ) ( void ) unlink ( path ) ; if ( rc < OWPErrWARNING ) { return NULL ; } I2ErrLog ( eh , " " ) ; return NULL ; } return fp ; }
Fetch a session with the given <sid> from the remote server.
Fetch a session with the given <sid > from the remote server .
/*
     * Prepare paths for datafiles. Unlink if not keeping data.
     */ /*
     * Ask for complete session 
     */ /*
         * server denied request...
         */