summaryrefslogtreecommitdiff
path: root/src/snuffleupagus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/snuffleupagus.c')
-rw-r--r--src/snuffleupagus.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c
index 4f02065..01bc4f6 100644
--- a/src/snuffleupagus.c
+++ b/src/snuffleupagus.c
@@ -154,13 +154,21 @@ PHP_MINFO_FUNCTION(snuffleupagus) {
154static PHP_INI_MH(OnUpdateConfiguration) { 154static PHP_INI_MH(OnUpdateConfiguration) {
155 TSRMLS_FETCH(); 155 TSRMLS_FETCH();
156 156
157 char *config_file = NULL;
158
157 if (!new_value || !new_value->len) { 159 if (!new_value || !new_value->len) {
158 return FAILURE; 160 return FAILURE;
159 } 161 }
160 162
161 if (sp_parse_config(new_value->val) != SUCCESS) { 163 config_file = strtok(new_value->val, ",");
164 if (sp_parse_config(config_file) != SUCCESS) {
162 return FAILURE; 165 return FAILURE;
163 } 166 }
167 while ((config_file = strtok(NULL, ","))) {
168 if (sp_parse_config(config_file) != SUCCESS) {
169 return FAILURE;
170 }
171 }
164 172
165 if (SNUFFLEUPAGUS_G(config).config_random->enable) { 173 if (SNUFFLEUPAGUS_G(config).config_random->enable) {
166 hook_rand(); 174 hook_rand();