Skip to content
Snippets Groups Projects
Commit 25c1913e authored by Dmitriy A. Gerasimov's avatar Dmitriy A. Gerasimov
Browse files

[*] Massive fixes

parent db050039
No related branches found
No related tags found
No related merge requests found
......@@ -120,7 +120,7 @@ PyObject *python_cellframe_init(PyObject *self, PyObject *args){
config_dir = PyUnicode_AsUTF8(config_dir_PyObject);
log_level = PyUnicode_AsUTF8(logLevel_PyObject);
if (dap_common_init(app_name, file_name_log) != 0){
if (dap_common_init(app_name, file_name_log,NULL ) != 0){
PyErr_SetString(CellFrame_error, "Can't init common functions module");
return NULL;
}
......
#include "wrapping_dap_stream_ctl.h"
#define LOG_TAG "wrapping_dap_stream_ctl"
PyObject *dap_stream_ctl_add_proc_py(PyObject *self, PyObject *args){
PyObject *obj_server;
const char *STREAM_CTL_URL;
......
#ifndef _WRAPPING_DAP_STREAM_CTL_
#define _WRAPPING_DAP_STREAM_CTL_
#pragma once
#include <Python.h>
#include "dap_config.h"
......@@ -13,8 +12,6 @@ typedef struct PyDapStreamCtl{
PyObject_HEAD
}PyDapStreamCtlObject;
dap_enc_key_type_t dap_enc_key_type;
PyObject *dap_stream_ctl_add_proc_py(PyObject *self, PyObject *args);
int dap_stream_ctl_init_py(uint32_t size);
......@@ -65,4 +62,3 @@ static PyTypeObject DapStreamCtl_DapStreamCtlType = {
PyType_GenericNew, /* tp_new */
};
#endif // _WRAPPING_DAP_STREAM_CTL_
......@@ -22,24 +22,15 @@ This file is part of DAP (Deus Applications Prototypes) the open source project
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _DAP_CHAIN_PLUGINS_
#define _DAP_CHAIN_PLUGINS_
#pragma once
#include <Python.h>
#include "dap_config.h"
#include "dap_common.h"
#include "dap_file_utils.h"
#include "dap_chain_plugins_manifest.h"
#include "dap_chain_plugins_list.h"
#include "python-cellframe.h"
#include "dap_chain_plugins_command.h"
#ifdef __cplusplus
extern "C"{
#endif
static PyObject *s_sys_path;
const char *s_plugins_root_path;
extern PyObject *s_sys_path;
extern const char *s_plugins_root_path;
int dap_chain_plugins_init();
void dap_chain_plugins_deinit();
......@@ -50,5 +41,3 @@ int dap_chain_plugins_reload_plugin(const char * a_name_plugin);
#ifdef __cplusplus
}
#endif
#endif //_DAP_CHAIN_PLUGINS_
......@@ -24,10 +24,6 @@ This file is part of DAP (Deus Applications Prototypes) the open source project
#pragma once
#define _DAP_CHAIN_PLUGINS_COMMAND_
#include "dap_chain_node_cli.h"
#include "dap_chain_node_cli_cmd.h"
#include "dap_chain_plugins_manifest.h"
#include "dap_chain_plugins.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -22,14 +22,7 @@ This file is part of DAP (Deus Applications Prototypes) the open source project
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _DAP_CHAIN_PLUGINS_MANIFEST_
#define _DAP_CHAIN_PLUGINS_MANIFEST_
#include "dap_common.h"
#include "dap_strfuncs.h"
#include "stdio.h"
#include "json-c/json_object.h"
#include "json-c/json_tokener.h"
#include "utlist.h"
#pragma once
#ifdef __cplusplus
extern "C"{
......@@ -52,7 +45,7 @@ typedef struct dap_list_manifest{
struct dap_list_manifest *next;
}dap_chain_plugins_list_manifest_t;
dap_chain_plugins_list_manifest_t* s_manifests;
extern dap_chain_plugins_list_manifest_t* s_manifests;
int dap_chain_plugins_manifest_name_cmp(dap_chain_plugins_list_manifest_t *a_man, const char *a_name);
......@@ -78,4 +71,3 @@ void dap_chain_plugins_manifest_list_delete_all(void);
#ifdef __cplusplus
}
#endif
#endif
#include "dap_config.h"
#include "dap_common.h"
#include "dap_file_utils.h"
#include "dap_chain_plugins_manifest.h"
#include "dap_chain_plugins_list.h"
#include "python-cellframe.h"
#include "dap_chain_plugins_command.h"
#include "dap_chain_plugins.h"
#undef LOG_TAG
#define LOG_TAG "dap_chain_plugins"
PyObject *s_sys_path = NULL;
const char *s_plugins_root_path = NULL;
int dap_chain_plugins_init(dap_config_t *a_config){
if(dap_config_get_item_bool_default(a_config, "plugins", "py_load", false)){
const char *l_defaule_path_plugins = dap_strjoin(NULL, "/opt/", dap_get_appname(), "/var/plugins/", NULL);
......
#include "dap_chain_node_cli.h"
#include "dap_chain_node_cli_cmd.h"
#include "dap_chain_plugins_manifest.h"
#include "dap_chain_plugins.h"
#include "utlist.h"
#include "dap_chain_plugins_command.h"
static bool s_l_restart_plugins = false;
......
#include "dap_common.h"
#include "dap_strfuncs.h"
#include "json-c/json_object.h"
#include "json-c/json_tokener.h"
#include "utlist.h"
#include "dap_chain_plugins_manifest.h"
#undef LOG_TAG
#define LOG_TAG "dap_chain_plugins_manifest"
dap_chain_plugins_list_manifest_t* s_manifests = NULL;
void dap_chain_plugins_list_char_delete_all(dap_chain_plugins_list_char_t *a_list){
dap_chain_plugins_list_char_t *l_element;
dap_chain_plugins_list_char_t *l_tmp;
......@@ -36,7 +43,7 @@ dap_chain_plugins_list_manifest_t *dap_chain_plugins_manifest_new(const char *a_
static dap_chain_plugins_list_char_t* JSON_array_to_dap_list_char(json_object *a_j_obj){
dap_chain_plugins_list_char_t *l_list = NULL;
dap_chain_plugins_list_char_t *l_element = NULL;
for (int i = 0; i < json_object_array_length(a_j_obj); i++){
for (size_t i = 0; i < json_object_array_length(a_j_obj); i++){
l_element = (dap_chain_plugins_list_char_t*)DAP_NEW(dap_chain_plugins_list_char_t);
l_element->value = dap_strdup(json_object_get_string(json_object_array_get_idx(a_j_obj, i)));
LL_APPEND(l_list, l_element);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment