Changeset 1113:eb4ce68b6e5c in freeDiameter for libfdproto/messages.c
- Timestamp:
- May 13, 2013, 8:17:13 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdproto/messages.c
r1103 r1113 2670 2670 2671 2671 /* Call all dispatch callbacks for a given message */ 2672 int fd_msg_dispatch ( struct msg ** msg, struct session * session, enum disp_action *action, char ** error_code )2672 int fd_msg_dispatch ( struct msg ** msg, struct session * session, enum disp_action *action, char ** error_code, char ** drop_reason, struct msg ** drop_msg) 2673 2673 { 2674 2674 struct dictionary * dict; … … 2684 2684 if (error_code) 2685 2685 *error_code = NULL; 2686 if (drop_reason) 2687 *drop_reason = NULL; 2686 2688 *action = DISP_ACT_CONT; 2687 2689 … … 2691 2693 2692 2694 /* First, call the DISP_HOW_ANY callbacks */ 2693 CHECK_FCT_DO( ret = fd_disp_call_cb_int( NULL, msg, NULL, session, action, NULL, NULL, NULL, NULL ), goto out );2695 CHECK_FCT_DO( ret = fd_disp_call_cb_int( NULL, msg, NULL, session, action, NULL, NULL, NULL, NULL, drop_reason, drop_msg ), goto out ); 2694 2696 2695 2697 TEST_ACTION_STOP(); … … 2708 2710 *action = DISP_ACT_ERROR; 2709 2711 } else { 2710 //fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Internal error: Received this answer to a local query with an unsupported application %d", (*msg)->msg_public.msg_appl);2711 fd_msg_free(*msg);2712 *drop_reason = "Internal error: Received this answer to a local query with an unsupported application"; 2713 *drop_msg = *msg; 2712 2714 *msg = NULL; 2713 2715 } … … 2740 2742 2741 2743 /* Call the callbacks */ 2742 CHECK_FCT_DO( ret = fd_disp_call_cb_int( cb_list, msg, avp, session, action, app, cmd, avp->avp_model, enumval ), goto out );2744 CHECK_FCT_DO( ret = fd_disp_call_cb_int( cb_list, msg, avp, session, action, app, cmd, avp->avp_model, enumval, drop_reason, drop_msg ), goto out ); 2743 2745 TEST_ACTION_STOP(); 2744 2746 } … … 2749 2751 /* Now call command and application callbacks */ 2750 2752 CHECK_FCT_DO( ret = fd_dict_disp_cb(DICT_COMMAND, cmd, &cb_list), goto out ); 2751 CHECK_FCT_DO( ret = fd_disp_call_cb_int( cb_list, msg, NULL, session, action, app, cmd, NULL, NULL ), goto out );2753 CHECK_FCT_DO( ret = fd_disp_call_cb_int( cb_list, msg, NULL, session, action, app, cmd, NULL, NULL, drop_reason, drop_msg ), goto out ); 2752 2754 TEST_ACTION_STOP(); 2753 2755 2754 2756 if (app) { 2755 2757 CHECK_FCT_DO( ret = fd_dict_disp_cb(DICT_APPLICATION, app, &cb_list), goto out ); 2756 CHECK_FCT_DO( ret = fd_disp_call_cb_int( cb_list, msg, NULL, session, action, app, cmd, NULL, NULL ), goto out );2758 CHECK_FCT_DO( ret = fd_disp_call_cb_int( cb_list, msg, NULL, session, action, app, cmd, NULL, NULL, drop_reason, drop_msg ), goto out ); 2757 2759 TEST_ACTION_STOP(); 2758 2760 }
Note: See TracChangeset
for help on using the changeset viewer.