mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 12:39:01 -04:00
bring back python_import and python_path.
These were mistakingly removed a while ago.
This commit is contained in:
parent
23b95448cc
commit
98d5909b7d
26
src/config.c
26
src/config.c
@ -156,6 +156,8 @@ static int configure_task_threads(char *);
|
|||||||
|
|
||||||
#if defined(KORE_USE_PYTHON)
|
#if defined(KORE_USE_PYTHON)
|
||||||
static int configure_deployment(char *);
|
static int configure_deployment(char *);
|
||||||
|
static int configure_python_path(char *);
|
||||||
|
static int configure_python_import(char *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(KORE_USE_CURL)
|
#if defined(KORE_USE_CURL)
|
||||||
@ -190,6 +192,10 @@ static struct {
|
|||||||
{ "runas", configure_privsep_runas },
|
{ "runas", configure_privsep_runas },
|
||||||
{ "client_verify", configure_client_verify },
|
{ "client_verify", configure_client_verify },
|
||||||
{ "client_verify_depth", configure_client_verify_depth },
|
{ "client_verify_depth", configure_client_verify_depth },
|
||||||
|
#if defined(KORE_USE_PYTHON)
|
||||||
|
{ "python_path", configure_python_path },
|
||||||
|
{ "python_import", configure_python_import },
|
||||||
|
#endif
|
||||||
#if !defined(KORE_NO_HTTP)
|
#if !defined(KORE_NO_HTTP)
|
||||||
{ "route", configure_route },
|
{ "route", configure_route },
|
||||||
{ "handler", configure_route_handler },
|
{ "handler", configure_route_handler },
|
||||||
@ -2011,6 +2017,26 @@ configure_deployment(char *value)
|
|||||||
return (KORE_RESULT_OK);
|
return (KORE_RESULT_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
configure_python_path(char *path)
|
||||||
|
{
|
||||||
|
kore_python_path(path);
|
||||||
|
|
||||||
|
return (KORE_RESULT_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
configure_python_import(char *module)
|
||||||
|
{
|
||||||
|
char *argv[3];
|
||||||
|
|
||||||
|
kore_split_string(module, " ", argv, 3);
|
||||||
|
if (argv[0] == NULL)
|
||||||
|
return (KORE_RESULT_ERROR);
|
||||||
|
|
||||||
|
kore_module_load(argv[0], argv[1], KORE_MODULE_PYTHON);
|
||||||
|
return (KORE_RESULT_OK);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(KORE_USE_PLATFORM_PLEDGE)
|
#if defined(KORE_USE_PLATFORM_PLEDGE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user