Mercurial > hg > freeDiameter
changeset 754:e02254d7d01b
Fix handling of message when no dispatch cb handled the message, to conform to documentation (thanks Zach for report)
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Sat, 24 Sep 2011 13:36:01 +0200 |
parents | 71833fa5e35f |
children | 463ffc722c1a |
files | libfdcore/routing_dispatch.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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... */