git:5.0:39d23182: ctl : implement rpc buffer size

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

git:5.0:39d23182: ctl : implement rpc buffer size

Daniel-Constantin Mierla-6
Module: kamailio
Branch: 5.0
Commit: 39d231828c26e697b07f04b4e7250f9da521e1ac
URL: https://github.com/kamailio/kamailio/commit/39d231828c26e697b07f04b4e7250f9da521e1ac

Author: lazedo <[hidden email]>
Committer: Daniel-Constantin Mierla <[hidden email]>
Date: 2017-06-14T15:53:05+02:00

ctl : implement rpc buffer size
(cherry picked from commit da6a5d9de5763330cc4159a2168f5e0042116cbc)

---

Modified: src/modules/ctl/binrpc_run.c

---

Diff:  https://github.com/kamailio/kamailio/commit/39d231828c26e697b07f04b4e7250f9da521e1ac.diff
Patch: https://github.com/kamailio/kamailio/commit/39d231828c26e697b07f04b4e7250f9da521e1ac.patch

---

diff --git a/src/modules/ctl/binrpc_run.c b/src/modules/ctl/binrpc_run.c
index 7c497ce94b..0a27278078 100644
--- a/src/modules/ctl/binrpc_run.c
+++ b/src/modules/ctl/binrpc_run.c
@@ -32,12 +32,15 @@
 #include <stdlib.h> /* strtod */
 #include <stdarg.h>
 
+#define DEFAULT_RPC_PRINTF_BUF_SIZE 1024
+
 /* if set try to automatically convert values to the requested type in
    rpc->scan (default: not set) */
 int autoconvert=0;
 
 int binrpc_max_body_size = 32; /* multiplied by 1024 in mod init */
 int binrpc_struct_max_body_size = 8; /* multiplied by 1024 in mod init */
+int binrpc_buffer_size = DEFAULT_RPC_PRINTF_BUF_SIZE;
 
 #define BINRPC_MAX_BODY binrpc_max_body_size  /* maximum body for send */
 #define STRUCT_MAX_BODY binrpc_struct_max_body_size
@@ -1012,7 +1015,7 @@ static int rpc_add(struct binrpc_ctx* ctx, char* fmt, ...)
 
 
 
-#define RPC_PRINTF_BUF_SIZE 1024
+#define RPC_PRINTF_BUF_SIZE binrpc_buffer_size
 /* returns  0 on success, -1 on error */
 static int rpc_rpl_printf(struct binrpc_ctx* ctx, char* fmt, ...)
 {


_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev