Navigation


Changeset 1301:50fb308e84f7 in freeDiameter for extensions


Ignore:
Timestamp:
Aug 30, 2015, 2:58:21 AM (9 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Added a new hook to allow extensions act on the error messages being returned in case of parsing error (e.g. if some mandatory AVP are expected in error messages)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/dbg_msg_dumps/dbg_msg_dumps.c

    r1299 r1301  
    105105                }
    106106                break;
     107        case HOOK_MESSAGE_PARSING_ERROR2:
     108                LOG_E("PARSING ERROR, returning:");
     109                LOG_SPLIT(FD_LOG_ERROR, "     ", buf, NULL);
     110                break;
    107111        case HOOK_MESSAGE_ROUTING_ERROR:
    108112                LOG_E("ROUTING ERROR '%s' for: ", (char *)other);
     
    198202                }
    199203                break;
     204        case HOOK_MESSAGE_PARSING_ERROR2:
     205                LOG_E("PARSING ERROR, returning: %s", buf);
     206                break;
    200207        case HOOK_MESSAGE_ROUTING_ERROR:
    201208                LOG_E("ROUTING ERROR '%s' for: %s", (char *)other, buf);
     
    280287                }
    281288                break;
     289        case HOOK_MESSAGE_PARSING_ERROR2:
     290                LOG_E("PARSING ERROR, returning: %s", buf);
     291                break;
    282292        case HOOK_MESSAGE_ROUTING_ERROR:
    283293                LOG_E("ROUTING ERROR '%s' for: %s", (char *)other, buf);
     
    351361        }
    352362       
    353         mask_errors = HOOK_MASK( HOOK_MESSAGE_FAILOVER, HOOK_MESSAGE_PARSING_ERROR, HOOK_MESSAGE_ROUTING_ERROR, HOOK_MESSAGE_DROPPED  );
     363        mask_errors = HOOK_MASK( HOOK_MESSAGE_FAILOVER, HOOK_MESSAGE_PARSING_ERROR, HOOK_MESSAGE_PARSING_ERROR2, HOOK_MESSAGE_ROUTING_ERROR, HOOK_MESSAGE_DROPPED  );
    354364        mask_sndrcv = HOOK_MASK( HOOK_MESSAGE_RECEIVED, HOOK_MESSAGE_SENT ); /* We don t access SENDING hook here */
    355365        mask_routing= HOOK_MASK( HOOK_MESSAGE_LOCAL, HOOK_MESSAGE_ROUTING_FORWARD, HOOK_MESSAGE_ROUTING_LOCAL );
Note: See TracChangeset for help on using the changeset viewer.