X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fsi%2Fsrc%2Fsi95%2Fsiconnect.c;fp=src%2Frmr%2Fsi%2Fsrc%2Fsi95%2Fsiconnect.c;h=ad5135d6da1708ff731bdb03f772f7eca5d6b825;hb=ece5bbead6922f59982227c9941babdd6054cf17;hp=77dce63ed27f7f9cdd90eae0cf746058d97d71a7;hpb=cf4413c47ce274d7fc08c3bcfc8c4de3d465ad4d;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 } }