src/server/daemon/config.c

changeset 650
3e4f9cdd70b8
parent 636
40f069ddda37
child 651
ed74879c7041
equal deleted inserted replaced
649:3887fd7e8bd7 650:3e4f9cdd70b8
165 serverconfig->pool = pool; 165 serverconfig->pool = pool;
166 166
167 CxAllocator *allocator = pool_allocator(serverconfig->pool); 167 CxAllocator *allocator = pool_allocator(serverconfig->pool);
168 serverconfig->a = allocator; 168 serverconfig->a = allocator;
169 169
170 serverconfig->destr = cxArrayListCreate(serverconfig->a, NULL, sizeof(ScfgDestr), 32);
171
170 serverconfig->listeners = cxLinkedListCreate(serverconfig->a, NULL, CX_STORE_POINTERS); 172 serverconfig->listeners = cxLinkedListCreate(serverconfig->a, NULL, CX_STORE_POINTERS);
171 serverconfig->logfiles = cxLinkedListCreate(serverconfig->a, NULL, CX_STORE_POINTERS); 173 serverconfig->logfiles = cxLinkedListCreate(serverconfig->a, NULL, CX_STORE_POINTERS);
172 serverconfig->host_vs = cxHashMapCreate(serverconfig->a, CX_STORE_POINTERS, 16); 174 serverconfig->host_vs = cxHashMapCreate(serverconfig->a, CX_STORE_POINTERS, 16);
173 serverconfig->authdbs = cxHashMapCreate(serverconfig->a, CX_STORE_POINTERS, 16); 175 serverconfig->authdbs = cxHashMapCreate(serverconfig->a, CX_STORE_POINTERS, 16);
174 serverconfig->resources = cxHashMapCreate(serverconfig->a, CX_STORE_POINTERS, 16); 176 serverconfig->resources = cxHashMapCreate(serverconfig->a, CX_STORE_POINTERS, 16);
1327 pblock_nvlinsert(d->name.ptr, d->name.length, arg->value.ptr, arg->value.length, pb); 1329 pblock_nvlinsert(d->name.ptr, d->name.length, arg->value.ptr, arg->value.length, pb);
1328 } 1330 }
1329 } 1331 }
1330 return pb; 1332 return pb;
1331 } 1333 }
1334
1335 void server_config_destroy(ServerConfiguration *cfg) {
1336 CxIterator i = cxListIterator(cfg->destr);
1337 cx_foreach(ScfgDestr *, d, i) {
1338 d->destr(d->data);
1339 }
1340 pool_destroy(cfg->pool);
1341 }

mercurial