| 145 | | buffer_copy_string_buffer(B->key, A); |
| 146 | | if (strncmp(A->ptr, "env.", sizeof("env.") - 1) == 0) { |
| 147 | | fprintf(stderr, "Setting env variable is not supported in conditional %d %s: %s\n", |
| 148 | | ctx->current->context_ndx, |
| 149 | | ctx->current->key->ptr, A->ptr); |
| 150 | | ctx->ok = 0; |
| 151 | | } else if (NULL == array_get_element(ctx->current->value, B->key->ptr)) { |
| 152 | | array_insert_unique(ctx->current->value, B); |
| 153 | | B = NULL; |
| 154 | | } else { |
| 155 | | fprintf(stderr, "Duplicate config variable in conditional %d %s: %s\n", |
| 156 | | ctx->current->context_ndx, |
| 157 | | ctx->current->key->ptr, B->key->ptr); |
| 158 | | ctx->ok = 0; |
| 159 | | B->free(B); |
| 160 | | B = NULL; |
| | 144 | if (ctx->ok) { |
| | 145 | buffer_copy_string_buffer(B->key, A); |
| | 146 | if (strncmp(A->ptr, "env.", sizeof("env.") - 1) == 0) { |
| | 147 | fprintf(stderr, "Setting env variable is not supported in conditional %d %s: %s\n", |
| | 148 | ctx->current->context_ndx, |
| | 149 | ctx->current->key->ptr, A->ptr); |
| | 150 | ctx->ok = 0; |
| | 151 | } else if (NULL == array_get_element(ctx->current->value, B->key->ptr)) { |
| | 152 | array_insert_unique(ctx->current->value, B); |
| | 153 | B = NULL; |
| | 154 | } else { |
| | 155 | fprintf(stderr, "Duplicate config variable in conditional %d %s: %s\n", |
| | 156 | ctx->current->context_ndx, |
| | 157 | ctx->current->key->ptr, B->key->ptr); |
| | 158 | ctx->ok = 0; |
| | 159 | B->free(B); |
| | 160 | B = NULL; |
| | 161 | } |