X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fsi%2Fsrc%2Fsi95%2Fsinewses.c;h=02a5e6db0ae766d2b4f697700bc995dc10b6abd3;hb=cc314e0c526a0ed0ce9295e490b3f2bb29c3332c;hp=6e439deebe13f6336a4c5fb2a7a575b1fadd2ea2;hpb=40e32867174c51c9b0ea50dfea19130c468cc200;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/si/src/si95/sinewses.c b/src/rmr/si/src/si95/sinewses.c index 6e439de..02a5e6d 100644 --- a/src/rmr/si/src/si95/sinewses.c +++ b/src/rmr/si/src/si95/sinewses.c @@ -71,33 +71,28 @@ extern int SInewsession( struct ginfo_blk *gptr, struct tp_blk *tpptr ) { newtp->next->prev = newtp; // back chain to us } gptr->tplist = newtp; - newtp->paddr = (struct sockaddr *) addr; // partner address + newtp->paddr = (struct sockaddr *) addr; // partner address newtp->fd = status; // save the fd from accept - //fprintf( stderr, ">>>>> newsession: accepted session on fd %d\n", status ); - if( gptr->tcp_flags & SI_TF_NODELAY ) { + if( gptr->tcp_flags & SI_TF_NODELAY ) { // set on/off for no delay configuration optval = 1; } else { optval = 0; } - //fprintf( stderr, ">>>>> newsession: setting no delay = %d\n", optval ); - SETSOCKOPT( tpptr->fd, SOL_TCP, TCP_NODELAY, (void *)&optval, sizeof( optval) ) ; + SETSOCKOPT( tpptr->fd, SOL_TCP, TCP_NODELAY, (void *)&optval, sizeof( optval) ); - - if( gptr->tcp_flags & SI_TF_FASTACK ) { + if( gptr->tcp_flags & SI_TF_FASTACK ) { // set on/off for fast ack config optval = 1; } else { optval = 0; } - //fprintf( stderr, ">>>>> conn_prep: setting quick ack = %d\n", optval ); SETSOCKOPT( tpptr->fd, SOL_TCP, TCP_QUICKACK, (void *)&optval, sizeof( optval) ) ; SIaddress( addr, (void **) &buf, AC_TODOT ); // get addr of remote side if( (cbptr = gptr->cbtab[SI_CB_SECURITY].cbrtn) != NULL ) { // invoke the security callback function if there status = (*cbptr)( gptr->cbtab[SI_CB_SECURITY].cbdata, buf ); if( status == SI_RET_ERROR ) { // session to be rejected - SIterm( gptr, newtp ); // terminate new tp block - SItrash( TP_BLK, newtp ); + SIterm( gptr, newtp ); // terminate new tp block (do NOT call trash) free( addr ); free( buf ); return SI_ERROR; @@ -108,7 +103,6 @@ extern int SInewsession( struct ginfo_blk *gptr, struct tp_blk *tpptr ) { newtp->flags |= TPF_SESSION; // indicate a session here - //fprintf( stderr, ">>>> pending connection callback for: %s\n", buf ); if( (cbptr = gptr->cbtab[SI_CB_CONN].cbrtn) != NULL ) { // drive connection callback status=(*cbptr)( gptr->cbtab[SI_CB_CONN].cbdata, newtp->fd, buf ); SIcbstat( gptr, status, SI_CB_CONN ); // handle status