xstrm.c
/*---------------------------------------------------------------------
 * ping_svr - Ping inbound server by sending a commit LCR.
 *---------------------------------------------------------------------*/
Ping inbound server by sending a commit LCR.
Ping inbound server by sending a commit LCR .
static void ping_svr(oci_t *xin_ocip, void *commit_lcr,
                     ub1 *cmtpos, ub2 cmtpos_len,
                     oratext *source_db, ub2 source_db_len)
{
  OCIDate     src_time;
  oratext     txid[128];
  OCICALL(xin_ocip, OCIDateSysDate(xin_ocip->errp, &src_time));
  sprintf((char *)txid, "Ping %2d:%2d:%2d",
          src_time.OCIDateTime.OCITimeHH,
          src_time.OCIDateTime.OCITimeMI,
          src_time.OCIDateTime.OCITimeSS);
  OCICALL(xin_ocip,
          OCILCRHeaderSet(xin_ocip->svcp, xin_ocip->errp,
                          source_db, source_db_len,
                          (oratext *)OCI_LCR_ROW_CMD_COMMIT,
                          (ub2)strlen(OCI_LCR_ROW_CMD_COMMIT),
                          (oratext *)0, 0,                     
                          (oratext *)0, 0,                    
                          (ub1 *)0, 0,                           
                          txid, (ub2)strlen((char *)txid),
                          &src_time, cmtpos, cmtpos_len,
                          0, commit_lcr, OCI_DEFAULT));
  if (OCIXStreamInLCRSend(xin_ocip->svcp, xin_ocip->errp, commit_lcr,
                          OCI_LCR_XROW, 0, OCI_DEFAULT) == OCI_ERROR)
  {
    ocierror(xin_ocip, (char *)"OCIXStreamInLCRSend failed in ping_svr()");
  }
}
static void ping_svr ( oci_t * xin_ocip , void * commit_lcr , ub1 * cmtpos , ub2 cmtpos_len , oratext * source_db , ub2 source_db_len ) { OCIDate src_time ; oratext txid [ 128 ] ; OCICALL ( xin_ocip , OCIDateSysDate ( xin_ocip -> errp , & src_time ) ) ; sprintf ( ( char * ) txid , " " , src_time . OCIDateTime . OCITimeHH , src_time . OCIDateTime . OCITimeMI , src_time . OCIDateTime . OCITimeSS ) ; OCICALL ( xin_ocip , OCILCRHeaderSet ( xin_ocip -> svcp , xin_ocip -> errp , source_db , source_db_len , ( oratext * ) OCI_LCR_ROW_CMD_COMMIT , ( ub2 ) strlen ( OCI_LCR_ROW_CMD_COMMIT ) , ( oratext * ) 0 , 0 , ( oratext * ) 0 , 0 , ( ub1 * ) 0 , 0 , txid , ( ub2 ) strlen ( ( char * ) txid ) , & src_time , cmtpos , cmtpos_len , 0 , commit_lcr , OCI_DEFAULT ) ) ; if ( OCIXStreamInLCRSend ( xin_ocip -> svcp , xin_ocip -> errp , commit_lcr , OCI_LCR_XROW , 0 , OCI_DEFAULT ) == OCI_ERROR ) { ocierror ( xin_ocip , ( char * ) " " ) ; } }
ping_svr - Ping inbound server by sending a commit LCR.
ping_svr - Ping inbound server by sending a commit LCR .
/* Initialize LCR with new txid and commit position */ /* null owner */ /* null object */ /* null tag */ /* Send commit lcr to inbound server. */