[MERGED] libosmo-sccp[master]: osmo_ss7: Allocate message buffers with headroom

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Apr 18 10:08:26 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: osmo_ss7: Allocate message buffers with headroom
......................................................................


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
---
M src/osmo_ss7.c
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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 @@
 {
 	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 @@
 {
 	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;

-- 
To view, visit https://gerrit.osmocom.org/2369
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic6dc9a1e7bbed2e1f73395bd18b727fa7892e25b
Gerrit-PatchSet: 2
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list