Navigation


Changeset 691:78b665400097 in freeDiameter for libfdcore/tcp.c


Ignore:
Timestamp:
Jan 20, 2011, 7:44:27 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Cleanup all pthread_cleanup_push / pop pairs so that pop is always called after push, or ASSERT(0) is some grave errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/tcp.c

    r662 r691  
    134134        CHECK_SYS(  s = socket(sa->sa_family, SOCK_STREAM, IPPROTO_TCP)  );
    135135       
     136        /* Set the socket options */
     137        CHECK_FCT(  fd_tcp_setsockopt(sa->sa_family, s)  );
     138       
    136139        /* Cleanup if we are cancelled */
    137140        pthread_cleanup_push(fd_cleanup_socket, &s);
    138        
    139         /* Set the socket options */
    140         CHECK_FCT(  fd_tcp_setsockopt(sa->sa_family, s)  );
    141141       
    142142        TRACE_DEBUG_sSA(FULL, "Attempting TCP connection with peer: ", sa, NI_NUMERICHOST | NI_NUMERICSERV, "..." );
Note: See TracChangeset for help on using the changeset viewer.