mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Dynamic config support for back-sql (untested)
This commit is contained in:
parent
31b5c396d3
commit
77cd4c53be
@ -50,6 +50,13 @@ backsql_api_config( backsql_info *bi, const char *name, int argc, char *argv[] )
|
||||
ch_free( ba2 );
|
||||
return 1;
|
||||
}
|
||||
ba2->ba_argc = argc;
|
||||
if ( argc ) {
|
||||
int i;
|
||||
ba2->ba_argv = ch_malloc( argc * sizeof(char *));
|
||||
for ( i=0; i<argc; i++ )
|
||||
ba2->ba_argv[i] = ch_strdup( argv[i] );
|
||||
}
|
||||
}
|
||||
|
||||
ba2->ba_next = bi->sql_api;
|
||||
|
@ -280,6 +280,8 @@ typedef struct backsql_api {
|
||||
|
||||
void *ba_private;
|
||||
struct backsql_api *ba_next;
|
||||
char **ba_argv;
|
||||
int ba_argc;
|
||||
} backsql_api;
|
||||
|
||||
/*
|
||||
@ -510,8 +512,9 @@ typedef struct backsql_info {
|
||||
struct berval sql_upper_func;
|
||||
struct berval sql_upper_func_open;
|
||||
struct berval sql_upper_func_close;
|
||||
BerVarray sql_concat_func;
|
||||
struct berval sql_strcast_func;
|
||||
BerVarray sql_concat_func;
|
||||
char *sql_concat_patt;
|
||||
|
||||
struct berval sql_aliasing;
|
||||
struct berval sql_aliasing_quote;
|
||||
@ -570,6 +573,7 @@ typedef struct backsql_info {
|
||||
BACKSQL_ISF(si, BSQLF_AUTOCOMMIT_ON)
|
||||
|
||||
Entry *sql_baseObject;
|
||||
char *sql_base_ob_file;
|
||||
#ifdef BACKSQL_ARBITRARY_KEY
|
||||
#define BACKSQL_BASEOBJECT_IDSTR "baseObject"
|
||||
#define BACKSQL_BASEOBJECT_KEYVAL BACKSQL_BASEOBJECT_IDSTR
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -46,6 +46,7 @@ sql_back_initialize(
|
||||
#endif /* ! BACKSQL_ARBITRARY_KEY */
|
||||
NULL
|
||||
};
|
||||
int rc;
|
||||
|
||||
bi->bi_controls = controls;
|
||||
|
||||
@ -58,7 +59,7 @@ sql_back_initialize(
|
||||
Debug( LDAP_DEBUG_TRACE,"==>sql_back_initialize()\n", 0, 0, 0 );
|
||||
|
||||
bi->bi_db_init = backsql_db_init;
|
||||
bi->bi_db_config = backsql_db_config;
|
||||
bi->bi_db_config = config_generic_wrapper;
|
||||
bi->bi_db_open = backsql_db_open;
|
||||
bi->bi_db_close = backsql_db_close;
|
||||
bi->bi_db_destroy = backsql_db_destroy;
|
||||
@ -80,8 +81,9 @@ sql_back_initialize(
|
||||
|
||||
bi->bi_connection_init = 0;
|
||||
|
||||
rc = backsql_init_cf( bi );
|
||||
Debug( LDAP_DEBUG_TRACE,"<==sql_back_initialize()\n", 0, 0, 0 );
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -308,4 +308,6 @@ extern BI_entry_release_rw backsql_entry_release;
|
||||
|
||||
extern BI_connection_destroy backsql_connection_destroy;
|
||||
|
||||
int backsql_init_cf( BackendInfo * bi );
|
||||
|
||||
#endif /* PROTO_SQL_H */
|
||||
|
Loading…
Reference in New Issue
Block a user