From 10b703e2788e257ce9c6a45fa4c2cc26f20c5215 Mon Sep 17 00:00:00 2001
From: Roman Khlopkov <roman.khlopkov@demlabs.net>
Date: Wed, 16 Mar 2022 09:30:23 +0300
Subject: [PATCH] [*] Build fix

---
 .../common/include/wrapping_dap_chain_common.h        |  2 +-
 .../common/src/wrapping_dap_chain_common.c            |  2 +-
 .../net/include/libdap_chain_net_python.h             |  2 +-
 .../cellframe-sdk/net/src/libdap_chain_net_python.c   |  2 +-
 .../net/srv/src/wrapping_dap_chain_net_srv_common.c   |  2 +-
 .../net/srv/src/wrapping_dap_chain_net_srv_order.c    | 11 +++++++----
 6 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h b/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h
index 7fb7eaa8..0a5e479e 100644
--- a/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h
+++ b/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h
@@ -88,7 +88,7 @@ typedef struct PyDapChainNetSrvUID{
 }PyDapChainNetSrvUIDObject;
 
 int PyDapChainNetSrvUIDObject_init(PyObject *self, PyObject *args, PyObject *kwds);
-PyObject* PyDapChainNetSrvUIDObject_str(PyDapChainNetSrvUIDObject *self);
+PyObject* PyDapChainNetSrvUIDObject_str(PyObject *self);
 
 extern PyTypeObject DapChainNetSrvUIDObject_DapChainNetSrvUIDObjectType;
 
diff --git a/modules/cellframe-sdk/common/src/wrapping_dap_chain_common.c b/modules/cellframe-sdk/common/src/wrapping_dap_chain_common.c
index 9f4aed05..45ff6791 100644
--- a/modules/cellframe-sdk/common/src/wrapping_dap_chain_common.c
+++ b/modules/cellframe-sdk/common/src/wrapping_dap_chain_common.c
@@ -603,7 +603,7 @@ PyObject* PyDapChainNodeAddrObject_str(PyObject* self){
 }
 
 /* wrapping dap_chain_net_srv_uid_t */
-PyObject* PyDapChainNetSrvUIDObject_str(PyDapChainNetSrvUIDObject *self){
+PyObject* PyDapChainNetSrvUIDObject_str(PyObject *self){
     char *res = dap_strdup_printf("0x%016"DAP_UINT64_FORMAT_X, ((PyDapChainNetSrvUIDObject*)self)->net_srv_uid.uint64);
     return Py_BuildValue("s", res);
 }
diff --git a/modules/cellframe-sdk/net/include/libdap_chain_net_python.h b/modules/cellframe-sdk/net/include/libdap_chain_net_python.h
index b5cd8590..040e7dc0 100644
--- a/modules/cellframe-sdk/net/include/libdap_chain_net_python.h
+++ b/modules/cellframe-sdk/net/include/libdap_chain_net_python.h
@@ -83,7 +83,7 @@ PyObject *dap_chain_net_add_notify_py(PyObject *self, PyObject *args);
 
 extern PyTypeObject DapChainNetObject_DapChainNetObjectType;
 
-static bool PyDapChainNet_Check(PyObject *self){
+static bool PyDapChainNet_Check(PyDapChainNetObject *self){
     return PyObject_TypeCheck(self, &DapChainNetObject_DapChainNetObjectType);
 }
 
diff --git a/modules/cellframe-sdk/net/src/libdap_chain_net_python.c b/modules/cellframe-sdk/net/src/libdap_chain_net_python.c
index a9396ea6..d020ae02 100644
--- a/modules/cellframe-sdk/net/src/libdap_chain_net_python.c
+++ b/modules/cellframe-sdk/net/src/libdap_chain_net_python.c
@@ -299,7 +299,7 @@ PyObject *dap_chain_net_add_notify_py(PyObject *self, PyObject *args){
     for(pvt_wrapping_dap_chain_net_notify_callback_list_t *list = pvt_list_notify; list != NULL; list = list->next){
         if (list->net == ((PyDapChainNetObject*)self)->chain_net)
             break;
-        dap_chain_net_add_notify_callback(((PyDapChainNetObject*)self)->chain_net, pvt_dap_chain_net_py_notify_handler);
+        dap_chain_net_add_gdb_notify_callback(((PyDapChainNetObject*)self)->chain_net, pvt_dap_chain_net_py_notify_handler, NULL);
     }
     pvt_wrapping_dap_chain_net_notify_callback_list_t *l_element = DAP_NEW(pvt_wrapping_dap_chain_net_notify_callback_list_t);
     l_element->net = ((PyDapChainNetObject*)self)->chain_net;
diff --git a/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_common.c b/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_common.c
index 26030ed8..66341ca4 100644
--- a/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_common.c
+++ b/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_common.c
@@ -58,7 +58,7 @@ PyTypeObject DapChainNetSrvPriceObject_DapChainNetSrvPriceObjectType = {
 
 PyObject *wrapping_dap_chain_net_srv_get_wallet(PyObject *self, void *closure){
     (void)closure;
-
+    return NULL;
 }
 PyObject *wrapping_dap_chain_net_srv_get_net_name(PyObject *self, void *closure){
     (void)closure;
diff --git a/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_order.c b/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_order.c
index 2526ce34..31f013b9 100644
--- a/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_order.c
+++ b/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_order.c
@@ -132,7 +132,7 @@ int PyDapChainNetSrvOrder_init(PyDapChainNetSrvOrderObject *self, PyObject *args
     char *price_ticker;
     unsigned long expires;
     PyObject *obj_ext, *obj_key;
-    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOOOOkOsOOO", kwlist, &obj_net, &obj_direction, &obj_srv_uid,
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOOOOkOsOOO", (char **)kwlist, &obj_net, &obj_direction, &obj_srv_uid,
                                      &obj_node_addr, &obj_tx_cond_hash, &price, &obj_price_unit, &price_ticker,
                                      &expires, &obj_ext, &obj_key)){
         return -1;
@@ -364,7 +364,7 @@ PyObject *wrapping_dap_chain_net_srv_order_find(PyObject *self, PyObject *args){
 PyObject *wrapping_dap_chain_net_srv_order_delete(PyObject *self, PyObject *args){
     (void)self;
     PyObject *obj_net;
-    PyObject *obj_order_hash;
+    PyDapHashFastObject *obj_order_hash;
     if (!PyArg_ParseTuple(args, "OO", &obj_net, &obj_order_hash)){
         PyErr_SetString(PyExc_ValueError, "This function must take two arguments. ");
         return NULL;
@@ -392,7 +392,10 @@ PyObject *wrapping_dap_chain_net_srv_order_delete(PyObject *self, PyObject *args
     return NULL;
 }
 
-PyObject *wrapping_dap_chain_net_srv_order_find_all_by(PyObject *self, PyObject *args){}
+PyObject *wrapping_dap_chain_net_srv_order_find_all_by(PyObject *self, PyObject *args){
+    return NULL;
+}
+
 PyObject *wrapping_dap_chain_net_srv_order_save(PyObject *self, PyObject *args){
     PyObject *obj_net;
     if(!PyArg_ParseTuple(args, "O", &obj_net)){
@@ -460,7 +463,7 @@ PyObject *wrapping_dap_chain_net_srv_order_add_notify_callback(PyObject *self, P
     _wrapping_list_func_callables_t *callback = DAP_NEW(_wrapping_list_func_callables_t);
     callback->func = func_call;
     dap_chain_net_srv_order_add_notify_callback(((PyDapChainNetObject*)obj_net)->chain_net,
-                                                _wrapping_handler_add_order_notify);
+                                                _wrapping_handler_add_order_notify, NULL);
     LL_APPEND(_s_callbacks, callback);
     return Py_None;
 }
-- 
GitLab