X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Frmr%2Fsi%2Fsrc%2Fsi95%2Fsiconnect.c;h=ad5135d6da1708ff731bdb03f772f7eca5d6b825;hb=fa454008020483ac35e1d20300cddfe877d8dd6d;hp=77dce63ed27f7f9cdd90eae0cf746058d97d71a7;hpb=43b7981cee870dcf523b910a3af92ccc53556b2a;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 77dce63..ad5135d 100644 --- a/src/rmr/si/src/si95/siconnect.c +++ b/src/rmr/si/src/si95/siconnect.c @@ -131,14 +131,12 @@ extern int SIconnect( struct ginfo_blk *gptr, char *abuf ) { errno = 0; if( tpptr->flags & TPF_SAFEC ) { if( safe_connect( tpptr->fd, taddr, tpptr->palen ) != 0 ) { // fd closed on failure - SItrash( TP_BLK, tpptr ); tpptr->fd = -1; } } else { if( CONNECT( tpptr->fd, taddr, tpptr->palen ) != 0 ) { CLOSE( tpptr->fd ); // clean up fd and tp_block tpptr->fd = -1; - SItrash( TP_BLK, tpptr ); // free the trasnsport block } } @@ -152,6 +150,8 @@ extern int SIconnect( struct ginfo_blk *gptr, char *abuf ) { gptr->tplist = tpptr; // point at new head fd = tpptr->fd; // save for return value SImap_fd( gptr, fd, tpptr ); + } else { + SItrash( TP_BLK, tpptr ); // free the trasnsport block } }