aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2014-01-16 19:13:34 +0400
committerIvan Kluchnikov <kluchnikovi@gmail.com>2014-01-16 19:13:34 +0400
commitcdbdfeaad8f68d449b576a71c7887624e3044098 (patch)
treecf217fc18637e754d9924c98d4f952133a6f105d
parentc4823ecdd106a03acb58608b354ed3d550cf476b (diff)
ctrl: Increase the maximum size of сontrol messagekluchnikov/nitb-ctrl-interface
We should support network-status control message, size of this message can be more than 4096 bytes.
-rwxr-xr-xopenbsc/contrib/bsc_control.py4
-rw-r--r--openbsc/src/libctrl/control_cmd.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/contrib/bsc_control.py b/openbsc/contrib/bsc_control.py
index cefb11065..f601ca3f5 100755
--- a/openbsc/contrib/bsc_control.py
+++ b/openbsc/contrib/bsc_control.py
@@ -85,14 +85,14 @@ if options.cmd_get:
parser.error("Get requires the var argument")
do_get(args[0], options.id, sock)
-data = sock.recv(10240)
+data = sock.recv(40960)
while (len(data)>0):
(answer, data) = remove_ipa_ctrl_header(data)
print "Got message:", answer
if options.monitor:
while (True):
- data = sock.recv(10240)
+ data = sock.recv(40960)
if len(data) == 0:
print "Connection is gone."
break
diff --git a/openbsc/src/libctrl/control_cmd.c b/openbsc/src/libctrl/control_cmd.c
index 3c4efc06d..5bfa7830d 100644
--- a/openbsc/src/libctrl/control_cmd.c
+++ b/openbsc/src/libctrl/control_cmd.c
@@ -411,7 +411,7 @@ struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd)
if (!cmd->id)
return NULL;
- msg = msgb_alloc_headroom(4096, 128, "ctrl command make");
+ msg = msgb_alloc_headroom(40960, 128, "ctrl command make");
if (!msg)
return NULL;