Navigation


Changeset 1175:2da13c87baa7 in freeDiameter for libfdcore


Ignore:
Timestamp:
Jun 3, 2013, 1:13:17 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Allow cancelation of thread in sctp_connectx when this function is not a cancelation point (bug of the system, seen on Ubuntu Precise at least)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/sctp.c

    r1174 r1175  
    925925#endif
    926926       
     927        /* Bug in some Linux kernel, the sctp_connectx is not a cancellation point. To avoid blocking freeDiameter, we allow async cancel here */
     928        pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
    927929#ifdef SCTP_CONNECTX_4_ARGS
    928930        ret = sctp_connectx(*sock, sar.sa, count, NULL);
     
    930932        ret = sctp_connectx(*sock, sar.sa, count);
    931933#endif /* SCTP_CONNECTX_4_ARGS */
     934        /* back to normal cancelation behabior */
     935        pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
    932936       
    933937        if (ret < 0) {
Note: See TracChangeset for help on using the changeset viewer.