Navigation


Changeset 29:5ba91682f0bc in freeDiameter for freeDiameter/p_psm.c


Ignore:
Timestamp:
Oct 28, 2009, 3:19:50 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added a test for cnxctx (tbc) and fixed some bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/p_psm.c

    r28 r29  
    209209        }
    210210       
     211        /* A new connection was established and CER containing this peer id was received */
     212        if (event == FDEVP_CNX_INCOMING) {
     213                struct cnx_incoming * params = ev_data;
     214                ASSERT(params);
     215               
     216                switch (peer->p_hdr.info.pi_state) {
     217                        case STATE_CLOSED:
     218                                TODO("Handle the CER, validate the peer if needed (and set expiry), set the alt_fifo in the connection, reply a CEA, eventually handshake, move to OPEN or REOPEN state");
     219                                break;
     220                               
     221                        case STATE_WAITCNXACK:
     222                        case STATE_WAITCEA:
     223                                TODO("Election");
     224                                break;
     225                               
     226                        default:
     227                                TODO("Reply with error CEA");
     228                                TODO("Close the connection");
     229                                /* reject_incoming_connection */
     230                       
     231                }
     232               
     233                free(ev_data);
     234                goto psm_loop;
     235        }
     236       
    211237        /* MSG_RECEIVED: fd_p_expi_update(struct fd_peer * peer ) */
    212238        /* If timeout or OPEN : call cb if defined */
     
    223249psm_end:
    224250        pthread_cleanup_pop(1); /* set STATE_ZOMBIE */
    225         pthread_detach(peer->p_psm);
    226251        peer->p_psm = (pthread_t)NULL;
     252        pthread_detach(pthread_self());
    227253        return NULL;
    228254}       
Note: See TracChangeset for help on using the changeset viewer.