Mercurial > hg > freeDiameter
changeset 919:b1776283d69e
Do not kill framework when a message with 0b session-id is dispatched
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Tue, 12 Feb 2013 18:19:19 +0100 |
parents | 46f9982b7d26 |
children | cb439d57d0c5 |
files | libfdproto/messages.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libfdproto/messages.c Tue Feb 12 14:57:32 2013 +0100 +++ b/libfdproto/messages.c Tue Feb 12 18:19:19 2013 +0100 @@ -1260,8 +1260,13 @@ ASSERT( avp->avp_public.avp_value ); /* Resolve the session and we are done */ - CHECK_FCT( fd_sess_fromsid_msg ( avp->avp_public.avp_value->os.data, avp->avp_public.avp_value->os.len, &msg->msg_sess, new) ); - *session = msg->msg_sess; + if (avp->avp_public.avp_value->os.len > 0) { + CHECK_FCT( fd_sess_fromsid_msg ( avp->avp_public.avp_value->os.data, avp->avp_public.avp_value->os.len, &msg->msg_sess, new) ); + *session = msg->msg_sess; + } else { + TRACE_DEBUG(FULL, "Session-Id AVP with 0-byte length found in message %p", msg); + *session = NULL; + } return 0; }