X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fdrtables.c;h=635c01be475e75894f4c2611a2979ba099731e62;hb=2b615f22d0ce78ba28a6d758d6a2a5c8cb33e10a;hp=54d03edab455878717585275f49e5cf267924883;hpb=b53c265b5c7825d7fb6bb672547c44d080459d71;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/drtables.c b/src/src/drtables.c index 54d03edab..635c01be4 100644 --- a/src/src/drtables.c +++ b/src/src/drtables.c @@ -73,7 +73,8 @@ auth_info auths_available[] = { .init = auth_cram_md5_init, .servercode = auth_cram_md5_server, .clientcode = auth_cram_md5_client, - .version_report = NULL + .version_report = NULL, + .macros_create = NULL, }, #endif @@ -87,7 +88,8 @@ auth_info auths_available[] = { .init = auth_cyrus_sasl_init, .servercode = auth_cyrus_sasl_server, .clientcode = NULL, - .version_report = auth_cyrus_sasl_version_report + .version_report = auth_cyrus_sasl_version_report, + .macros_create = NULL, }, #endif @@ -101,7 +103,8 @@ auth_info auths_available[] = { .init = auth_dovecot_init, .servercode = auth_dovecot_server, .clientcode = NULL, - .version_report = NULL + .version_report = NULL, + .macros_create = NULL, }, #endif @@ -115,7 +118,8 @@ auth_info auths_available[] = { .init = auth_external_init, .servercode = auth_external_server, .clientcode = auth_external_client, - .version_report = NULL + .version_report = NULL, + .macros_create = NULL, }, #endif @@ -128,8 +132,9 @@ auth_info auths_available[] = { .options_len = sizeof(auth_gsasl_options_block), .init = auth_gsasl_init, .servercode = auth_gsasl_server, - .clientcode = NULL, - .version_report = auth_gsasl_version_report + .clientcode = auth_gsasl_client, + .version_report = auth_gsasl_version_report, + .macros_create = auth_gsasl_macros, }, #endif @@ -143,7 +148,8 @@ auth_info auths_available[] = { .init = auth_heimdal_gssapi_init, .servercode = auth_heimdal_gssapi_server, .clientcode = NULL, - .version_report = auth_heimdal_gssapi_version_report + .version_report = auth_heimdal_gssapi_version_report, + .macros_create = NULL, }, #endif @@ -157,7 +163,8 @@ auth_info auths_available[] = { .init = auth_plaintext_init, .servercode = auth_plaintext_server, .clientcode = auth_plaintext_client, - .version_report = NULL + .version_report = NULL, + .macros_create = NULL, }, #endif @@ -171,7 +178,8 @@ auth_info auths_available[] = { .init = auth_spa_init, .servercode = auth_spa_server, .clientcode = auth_spa_client, - .version_report = NULL + .version_report = NULL, + .macros_create = NULL, }, #endif @@ -185,7 +193,8 @@ auth_info auths_available[] = { .init = auth_tls_init, .servercode = auth_tls_server, .clientcode = NULL, - .version_report = NULL + .version_report = NULL, + .macros_create = NULL, }, #endif @@ -509,7 +518,7 @@ static struct lookupmodulestr *lookupmodules = NULL; static void addlookupmodule(void *dl, struct lookup_module_info *info) { -struct lookupmodulestr *p = store_malloc(sizeof(struct lookupmodulestr)); +struct lookupmodulestr *p = store_get(sizeof(struct lookupmodulestr), FALSE); p->dl = dl; p->info = info; @@ -564,6 +573,9 @@ extern lookup_module_info dsearch_lookup_module_info; #if defined(LOOKUP_IBASE) && LOOKUP_IBASE!=2 extern lookup_module_info ibase_lookup_module_info; #endif +#if defined(LOOKUP_JSON) +extern lookup_module_info json_lookup_module_info; +#endif #if defined(LOOKUP_LDAP) extern lookup_module_info ldap_lookup_module_info; #endif @@ -617,12 +629,12 @@ init_lookup_list(void) int countmodules = 0; int moduleerrors = 0; #endif - struct lookupmodulestr *p; static BOOL lookup_list_init_done = FALSE; - + rmark reset_point; if (lookup_list_init_done) return; + reset_point = store_mark(); lookup_list_init_done = TRUE; #if defined(LOOKUP_CDB) && LOOKUP_CDB!=2 @@ -649,6 +661,10 @@ init_lookup_list(void) addlookupmodule(NULL, &ldap_lookup_module_info); #endif +#ifdef LOOKUP_JSON + addlookupmodule(NULL, &json_lookup_module_info); +#endif + #if defined(LOOKUP_LSEARCH) && LOOKUP_LSEARCH!=2 addlookupmodule(NULL, &lsearch_lookup_module_info); #endif @@ -780,17 +796,10 @@ init_lookup_list(void) memset(lookup_list, 0, sizeof(lookup_info *) * lookup_list_count); /* now add all lookups to the real list */ - p = lookupmodules; - while (p) { - struct lookupmodulestr *pnext; - + for (struct lookupmodulestr * p = lookupmodules; p; p = p->next) for (int j = 0; j < p->info->lookupcount; j++) add_lookup_to_list(p->info->lookups[j]); - - pnext = p->next; - store_free(p); - p = pnext; - } + store_reset(reset_point); /* just to be sure */ lookupmodules = NULL; }