X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fsi%2Fsrc%2Fsi95%2Fsipoll.c;fp=src%2Frmr%2Fsi%2Fsrc%2Fsi95%2Fsipoll.c;h=c47fb97eb2a00a899cacdb567e4bd5e366bfaa67;hb=3d7285ec4c96724b64968f46c2075b77e8d08543;hp=0ecca665e31c2aa46e65cba5e24e0b46c2c5b3fd;hpb=fc5c77b3d78988aa407118235d7f5978642df753;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/si/src/si95/sipoll.c b/src/rmr/si/src/si95/sipoll.c index 0ecca66..c47fb97 100644 --- a/src/rmr/si/src/si95/sipoll.c +++ b/src/rmr/si/src/si95/sipoll.c @@ -121,8 +121,9 @@ extern int SIpoll( struct ginfo_blk *gptr, int msdelay ) // for( tpptr = gptr->tplist; tpptr != NULL; tpptr = tpptr->next ) for( tpptr = gptr->tplist; tpptr != NULL; tpptr = nextone ) - { - nextone = tpptr->next; // prevent coredump if we delete the session + tpptr = gptr->tplist; + while( tpptr != NULL ) { + nextone = tpptr->next; // allow for a delete in loop if( tpptr->squeue != NULL && (FD_ISSET( tpptr->fd, &gptr->writefds )) ) SIsend( gptr, tpptr ); // send if clear to send @@ -180,6 +181,8 @@ extern int SIpoll( struct ginfo_blk *gptr, int msdelay ) } } // end tcp read } // end if event on this fd + + tpptr = nextone; } // end for each fd in the list } // end if not in shutdown