summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-04-15 23:17:01 +0200
committerHarald Welte <laforge@gnumonks.org>2017-04-18 10:08:25 +0000
commit529adc67c416832dcecd20a9a54f92c9f618ee93 (patch)
treebb886fe75a4c3bbc69ac45b8994af3a186e2dcb0
parent6a77241cb178cb237b47e044db5470b0071c88d2 (diff)
osmo_ss7: Allocate message buffers with headroom
The use of m3ua_msgb_alloc() from generic code is a bit ugly, but I really don't want to introduce yet another msgb_alloc wrapper. Change-Id: Ic6dc9a1e7bbed2e1f73395bd18b727fa7892e25b
-rw-r--r--src/osmo_ss7.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 977dae3..31c0dc5 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -48,7 +48,6 @@
#include "xua_asp_fsm.h"
#include "xua_as_fsm.h"
-#define ASP_MSGB_SIZE 1500
#define MAX_PC_STR_LEN 32
static bool ss7_initialized = false;
@@ -1274,7 +1273,7 @@ static int xua_srv_conn_cb(struct osmo_stream_srv *conn)
{
struct osmo_fd *ofd = osmo_stream_srv_get_ofd(conn);
struct osmo_ss7_asp *asp = osmo_stream_srv_get_data(conn);
- struct msgb *msg = msgb_alloc(ASP_MSGB_SIZE, "xUA Server Rx");
+ struct msgb *msg = m3ua_msgb_alloc("xUA Server Rx");
struct sctp_sndrcvinfo sinfo;
unsigned int ppid;
int flags = 0;
@@ -1414,7 +1413,7 @@ static int xua_cli_read_cb(struct osmo_stream_cli *conn)
{
struct osmo_fd *ofd = osmo_stream_cli_get_ofd(conn);
struct osmo_ss7_asp *asp = osmo_stream_cli_get_data(conn);
- struct msgb *msg = msgb_alloc(ASP_MSGB_SIZE, "xUA Client Rx");
+ struct msgb *msg = m3ua_msgb_alloc("xUA Client Rx");
struct sctp_sndrcvinfo sinfo;
unsigned int ppid;
int flags = 0;