Navigation


Changeset 454:f1484823cb4a in freeDiameter for freeDiameter/cnxctx.c


Ignore:
Timestamp:
Jul 29, 2010, 4:11:12 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Small hack which might spear some concurrency problems and is quite harmless

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/cnxctx.c

    r423 r454  
    464464{
    465465        CHECK_PARAMS_DO( conn, return 0 );
     466        fd_cpu_flush_cache();
    466467        return conn->cc_status & CC_STATUS_TLS;
    467468}
     
    545546       
    546547        /* Mark the error */
     548        fd_cpu_flush_cache();
    547549        conn->cc_status |= CC_STATUS_ERROR;
    548550       
     
    553555                conn->cc_status |= CC_STATUS_SIGNALED;
    554556        }
    555        
     557        fd_cpu_flush_cache();
    556558        return;
    557559fatal:
     
    581583        /* Handle special case of timeout */
    582584        if ((ret < 0) && (errno == EAGAIN)) {
     585                fd_cpu_flush_cache();
    583586                if (! (conn->cc_status & CC_STATUS_CLOSING))
    584587                        goto again; /* don't care, just ignore */
     
    607610        /* Handle special case of timeout */
    608611        if ((ret < 0) && (errno == EAGAIN)) {
     612                fd_cpu_flush_cache();
    609613                if (! (conn->cc_status & CC_STATUS_CLOSING))
    610614                        goto again; /* don't care, just ignore */
     
    725729       
    726730        do {
     731                fd_cpu_flush_cache();
    727732                CHECK_FCT_DO( fd_sctp_recvmeta(conn->cc_socket, NULL, &buf, &bufsz, &event, &conn->cc_status), goto fatal );
    728733                if (event == FDEVP_CNX_ERROR) {
     
    796801                        switch (ret) {
    797802                                case GNUTLS_E_REHANDSHAKE:
     803                                        fd_cpu_flush_cache();
    798804                                        if (!(conn->cc_status & CC_STATUS_CLOSING))
    799805                                                CHECK_GNUTLS_DO( ret = gnutls_handshake(session),
     
    807813                                case GNUTLS_E_AGAIN:
    808814                                case GNUTLS_E_INTERRUPTED:
     815                                        fd_cpu_flush_cache();
    809816                                        if (!(conn->cc_status & CC_STATUS_CLOSING))
    810817                                                goto again;
     
    840847                        switch (ret) {
    841848                                case GNUTLS_E_REHANDSHAKE:
     849                                        fd_cpu_flush_cache();
    842850                                        if (!(conn->cc_status & CC_STATUS_CLOSING))
    843851                                                CHECK_GNUTLS_DO( ret = gnutls_handshake(session),
     
    851859                                case GNUTLS_E_AGAIN:
    852860                                case GNUTLS_E_INTERRUPTED:
     861                                        fd_cpu_flush_cache();
    853862                                        if (!(conn->cc_status & CC_STATUS_CLOSING))
    854863                                                goto again;
     
    12351244
    12361245        /* Mark the connection as protected from here, so that the gnutls credentials will be freed */
     1246        fd_cpu_flush_cache();
    12371247        conn->cc_status |= CC_STATUS_TLS;
    12381248
     
    13591369        TRACE_ENTRY("%p %p %zd", conn, buf, len);
    13601370        do {
     1371                fd_cpu_flush_cache();
    13611372                if (conn->cc_status & CC_STATUS_TLS) {
    13621373                        CHECK_GNUTLS_DO( ret = fd_tls_send_handle_error(conn, conn->cc_tls_para.session, buf + sent, len - sent),  );
     
    13921403                                /* Send the buffer over all other streams */
    13931404                                uint16_t str;
     1405                                fd_cpu_flush_cache();
    13941406                                if (conn->cc_status & CC_STATUS_TLS) {
    13951407                                        for ( str=1; str < conn->cc_sctp_para.pairs; str++) {
     
    14741486        CHECK_PARAMS_DO(conn, return);
    14751487       
     1488        fd_cpu_flush_cache();
    14761489        conn->cc_status |= CC_STATUS_CLOSING;
    14771490       
Note: See TracChangeset for help on using the changeset viewer.