X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fsi%2Fsrc%2Fsi95%2Fsiconnect.c;h=a48cb43b2222f14f5ec96f61a6a4ab5274b1733b;hb=2d9d6784b306047e94ca9816813e5007b00fd17e;hp=e7fd7b3e7f0f88d508b8736bb3430ca90350091e;hpb=ec88d3c0563eeb6ae5f73427edb0b3c4d7acf299;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/si/src/si95/siconnect.c b/src/rmr/si/src/si95/siconnect.c index e7fd7b3..a48cb43 100644 --- a/src/rmr/si/src/si95/siconnect.c +++ b/src/rmr/si/src/si95/siconnect.c @@ -46,7 +46,7 @@ extern void SImap_fd( struct ginfo_blk *gptr, int fd, struct tp_blk* tpptr ) { if( fd < MAX_FDS ) { gptr->tp_map[fd] = tpptr; } else { - fprintf( stderr, "[WRN] fd on connected session is out of range: %d\n", fd ); + rmr_vlog( RMR_VL_WARN, "fd on connected session is out of range: %d\n", fd ); } } @@ -57,29 +57,25 @@ extern int SIconnect( struct ginfo_blk *gptr, char *abuf ) { int alen = 0; // len of address struct int fd = SI_ERROR; // file descriptor to return to caller - if( PARINOID_CHECKS ) { + if( PARANOID_CHECKS ) { if( gptr == NULL ) { return SI_ERROR; } - gptr->sierr = SI_ERR_HANDLE; if( gptr->magicnum != MAGICNUM ) { // no cookie -- no connection return SI_ERROR; } } - gptr->sierr = SI_ERR_TPORT; tpptr = SIconn_prep( gptr, TCP_DEVICE, abuf, 0 ); // create tp struct, and socket. get peer address 0 == any family that suits the addr if( tpptr != NULL ) { taddr = tpptr->paddr; - gptr->sierr = SI_ERR_TP; errno = 0; if( connect( tpptr->fd, taddr, tpptr->palen ) != 0 ) { close( tpptr->fd ); // clean up fd and tp_block SItrash( TP_BLK, tpptr ); // free the trasnsport block fd = SI_ERROR; // send bad session id num back } else { // connect ok - gptr->sierr = 0; tpptr->flags |= TPF_SESSION; // indicate we have a session here tpptr->next = gptr->tplist; // add block to the list if( tpptr->next != NULL ) {