# HG changeset patch # User Sebastien Decugis # Date 1316864161 -7200 # Node ID e02254d7d01b551fa89a446e0b366170d0dd7e6f # Parent 71833fa5e35f9b7837b34701f0748d5b7b6d20ab Fix handling of message when no dispatch cb handled the message, to conform to documentation (thanks Zach for report) diff -r 71833fa5e35f -r e02254d7d01b libfdcore/routing_dispatch.c --- a/libfdcore/routing_dispatch.c Sat Sep 24 13:00:30 2011 +0200 +++ b/libfdcore/routing_dispatch.c Sat Sep 24 13:36:01 2011 +0200 @@ -491,7 +491,13 @@ if (*pmsg) switch ( action ) { case DISP_ACT_CONT: - /* No callback has handled the message, let's reply with a generic error */ + /* No callback has handled the message, let's reply with a generic error or relay it */ + if (!fd_g_config->cnf_flags.no_fwd) { + /* requeue to fd_g_outgoing */ + CHECK_FCT( fd_fifo_post(fd_g_outgoing, pmsg) ); + break; + } + /* We don't relay => reply error */ em = "The message was not handled by any extension callback"; ec = "DIAMETER_COMMAND_UNSUPPORTED"; /* and continue as if an error occurred... */