# HG changeset patch # User Sebastien Decugis # Date 1282285138 -32400 # Node ID 17435072de36e9272c223bb4829be5dbacff31fb # Parent 48d306c0db294e4283cefd0aefe889f4a5351a96 Search extensions conf files in the main configuration folder also diff -r 48d306c0db29 -r 17435072de36 extensions/app_diameap/diameap.y --- a/extensions/app_diameap/diameap.y Fri Aug 20 14:28:45 2010 +0900 +++ b/extensions/app_diameap/diameap.y Fri Aug 20 15:18:58 2010 +0900 @@ -133,9 +133,9 @@ fl = fopen(cfile, "r"); if ((fl == NULL) && (*cfile != '/')) { char * tmp = cfile; - CHECK_MALLOC_DO( cfile = malloc( strlen(tmp) + strlen(DEFAULT_EXTENSIONS_PATH) + 2 ), + CHECK_MALLOC_DO( cfile = malloc( strlen(tmp) + strlen(DEFAULT_CONF_PATH) + 2 ), { yyerror (&yylloc, config, "Not enough memory"); YYERROR; } ); - sprintf(cfile, DEFAULT_EXTENSIONS_PATH "/%s", tmp); + sprintf(cfile, DEFAULT_CONF_PATH "/%s", tmp); free(tmp); fl = fopen(cfile, "r"); } diff -r 48d306c0db29 -r 17435072de36 extensions/app_radgw/rgwx_echodrop.y --- 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));