Navigation


Changeset 1017:d69612a16929 in freeDiameter for libfdproto


Ignore:
Timestamp:
Apr 1, 2013, 12:27:34 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Do not abort dispatch thread when a callback returns an error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/dispatch.c

    r987 r1017  
    7171{
    7272        struct fd_list * senti, *li;
     73        int r;
    7374        TRACE_ENTRY("%p %p %p %p %p %p %p %p %p", cb_list, msg, avp, sess, action, obj_app, obj_cmd, obj_avp, obj_enu);
    7475        CHECK_PARAMS(msg && action);
     
    9495               
    9596                /* We have a match, the cb must be called. */
    96                 CHECK_FCT( (*hdl->cb)(msg, avp, sess, hdl->opaque, action) );
     97                CHECK_FCT_DO( (r = (*hdl->cb)(msg, avp, sess, hdl->opaque, action)),
     98                        {
     99                                fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Internal error: a DISPATCH callback returned an error (%s)", strerror(r));
     100                                fd_msg_free(*msg);
     101                                *msg = NULL;
     102                        }
     103                 );
    97104               
    98105                if (*action != DISP_ACT_CONT)
Note: See TracChangeset for help on using the changeset viewer.