Mercurial > hg > freeDiameter
diff extensions/app_radgw/rgwx_echodrop.y @ 511:17435072de36
Search extensions conf files in the main configuration folder also
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 20 Aug 2010 15:18:58 +0900 |
parents | 26aafbbc1640 |
children | 4a9f08d6b6ba |
line wrap: on
line diff
--- a/extensions/app_radgw/rgwx_echodrop.y Fri Aug 20 14:28:45 2010 +0900 +++ b/extensions/app_radgw/rgwx_echodrop.y Fri Aug 20 15:18:58 2010 +0900 @@ -68,6 +68,13 @@ int ret; rgwx_echodropin = fopen(conffile, "r"); + if ((rgwx_echodropin == NULL) && (*conffile != '/')) { /* We received a relative path, try adding DEFAULT_CONF_PATH prefix */ + char * fullpath; + CHECK_MALLOC( fullpath = malloc( strlen(conffile) + strlen(DEFAULT_CONF_PATH) + 2 ) ); + sprintf( fullpath, DEFAULT_CONF_PATH "/%s", conffile ); + rgwx_echodropin = fopen(fullpath, "r"); + free(fullpath); + } if (rgwx_echodropin == NULL) { ret = errno; fd_log_debug("[echodrop.rgwx] Unable to open plugin configuration file %s for reading: %s\n", conffile, strerror(ret));