# HG changeset patch # User Sebastien Decugis # Date 1278395646 -32400 # Node ID 554fe1d67acc5d3fdf20dc88563086465eb9e5ad # Parent 743195485eec3afecbb316716e95d93d41799c26 Fix small issue in the gateway diff -r 743195485eec -r 554fe1d67acc extensions/app_radgw/rgwx_auth.c --- a/extensions/app_radgw/rgwx_auth.c Tue Jul 06 14:49:33 2010 +0900 +++ b/extensions/app_radgw/rgwx_auth.c Tue Jul 06 14:54:06 2010 +0900 @@ -375,7 +375,7 @@ break; case RADIUS_ATTR_USER_NAME: - TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", attr_len, attr_val); + TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", attr_len, attr_len ? attr_val : ""); un = attr_val; un_len = attr_len; break; @@ -427,7 +427,7 @@ } } } - if (i == 0) { + if (i <= 0) { /* Not found in the User-Name => we use the local domain of this gateway */ value.os.data = fd_g_config->cnf_diamrlm; value.os.len = fd_g_config->cnf_diamrlm_len;