Mercurial > hg > freeDiameter
changeset 380:6641d6f80cb6
Added test app for Diameter-SIP(client side)
author | Alexandre Westfahl <awestfahl@freediameter.net> |
---|---|
date | Mon, 05 Jul 2010 17:08:51 +0900 |
parents | 7337305ee51e |
children | 9af1e3b432e6 |
files | extensions/CMakeLists.txt extensions/app_radgw/rgwx_sip.c |
diffstat | 2 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/CMakeLists.txt Mon Jul 05 17:04:46 2010 +0900 +++ b/extensions/CMakeLists.txt Mon Jul 05 17:08:51 2010 +0900 @@ -102,6 +102,11 @@ SUBDIRS(test_app) ENDIF (BUILD_TEST_APP) +OPTION(BUILD_TEST_APP "Build test_sip.fdx? (Testing application to simulate Diameter-SIP client (RFC4740), for testing purpose only)" OFF) + IF (BUILD_TEST_SIP) + SUBDIRS(test_sip) + ENDIF (BUILD_TEST_SIP) + # The following extension have very little use except for specific tests, so we disable them except in Debug configurations. IF (CMAKE_BUILD_TYPE MATCHES "Debug") OPTION(BUILD_SAMPLE "Build sample.fdx? (Simple extension to demonstrate extension mechanism, for developpers only)" OFF)
--- a/extensions/app_radgw/rgwx_sip.c Mon Jul 05 17:04:46 2010 +0900 +++ b/extensions/app_radgw/rgwx_sip.c Mon Jul 05 17:08:51 2010 +0900 @@ -725,8 +725,6 @@ //fd_msg_dump_walk(1,*diam_fw); /* Store the request identifier in the session (if provided) */ - - if (*session) { unsigned char * req_sip; CHECK_MALLOC(req_sip = malloc(16)); @@ -855,6 +853,9 @@ case DIAM_ATTR_DIGEST_RESPONSE_AUTH: CONV2RAD_STR(DIAM_ATTR_DIGEST_RESPONSE_AUTH, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0); break; + default: + handled=0; + break; } } else @@ -866,11 +867,13 @@ handled = 0; } } + if (handled) { + CHECK_FCT( fd_msg_free( avp ) ); + } } if (session) { - //TODO: authenticator & message-authenticator CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, session, &req_sip ) ); } free(req_sip);