comparison 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
comparison
equal deleted inserted replaced
510:48d306c0db29 511:17435072de36
66 { 66 {
67 extern FILE * rgwx_echodropin; 67 extern FILE * rgwx_echodropin;
68 int ret; 68 int ret;
69 69
70 rgwx_echodropin = fopen(conffile, "r"); 70 rgwx_echodropin = fopen(conffile, "r");
71 if ((rgwx_echodropin == NULL) && (*conffile != '/')) { /* We received a relative path, try adding DEFAULT_CONF_PATH prefix */
72 char * fullpath;
73 CHECK_MALLOC( fullpath = malloc( strlen(conffile) + strlen(DEFAULT_CONF_PATH) + 2 ) );
74 sprintf( fullpath, DEFAULT_CONF_PATH "/%s", conffile );
75 rgwx_echodropin = fopen(fullpath, "r");
76 free(fullpath);
77 }
71 if (rgwx_echodropin == NULL) { 78 if (rgwx_echodropin == NULL) {
72 ret = errno; 79 ret = errno;
73 fd_log_debug("[echodrop.rgwx] Unable to open plugin configuration file %s for reading: %s\n", conffile, strerror(ret)); 80 fd_log_debug("[echodrop.rgwx] Unable to open plugin configuration file %s for reading: %s\n", conffile, strerror(ret));
74 return ret; 81 return ret;
75 } 82 }
"Welcome to our mercurial repository"