Add safe connect, fix possible seg fault in RTC
[ric-plt/lib/rmr.git] / src / rmr / si / src / si95 / sinewses.c
index 0b00ba4..6e439de 100644 (file)
@@ -61,7 +61,7 @@ extern int SInewsession( struct ginfo_blk *gptr, struct tp_blk *tpptr ) {
 
        newtp = SInew( TP_BLK );                              //  get a new tp block for the session
        if( newtp == NULL ) {
-               close( status );                                                // must disconnect the other side
+               CLOSE( status );                                                // must disconnect the other side
                free( addr );
                return SI_ERROR;
        }
@@ -114,7 +114,6 @@ extern int SInewsession( struct ginfo_blk *gptr, struct tp_blk *tpptr ) {
                SIcbstat(  gptr, status, SI_CB_CONN );               //  handle status
        }
 
-       gptr->flags |= GIF_SESS_CHANGE;                 // sessions changed must rebuild the poll list
        SImap_fd( gptr, newtp->fd, newtp );             // add fd to the map
 
        return SI_OK;