X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fsi%2Fsrc%2Fsi95%2Fsinewses.c;fp=src%2Frmr%2Fsi%2Fsrc%2Fsi95%2Fsinewses.c;h=1549217d8f64a2e9348a365e2983379d9d1acc0b;hb=691909ffc0dab5989347ecb00b839e68569db164;hp=8665892ddd6d9ac97b183e62e80fede384a90884;hpb=d5e663fe0b25b6330dc2e242efb5b70ea563d80d;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 8665892..1549217 100644 --- a/src/rmr/si/src/si95/sinewses.c +++ b/src/rmr/si/src/si95/sinewses.c @@ -89,6 +89,17 @@ extern int SInewsession( struct ginfo_blk *gptr, struct tp_blk *tpptr ) { } SETSOCKOPT( tpptr->fd, SOL_TCP, TCP_QUICKACK, (void *)&optval, sizeof( optval) ) ; + if( gptr->tcp_flags & SI_TF_QUICK ) { + optval = 1; + SETSOCKOPT( tpptr->fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&optval, sizeof( optval) ) ; + optval = 1; + SETSOCKOPT( tpptr->fd, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&optval, sizeof( optval) ) ; + optval = 1; + SETSOCKOPT( tpptr->fd, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&optval, sizeof( optval) ) ; + optval = 5; + SETSOCKOPT( tpptr->fd, IPPROTO_TCP, TCP_KEEPCNT, (void *)&optval, sizeof( optval) ) ; + } + SIaddress( addr, (void **) &buf, AC_TODOT ); // get addr of remote side; buf must be freed 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 );