summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@espeweb.net>2021-02-02 16:43:40 +0100
committerlaforge <laforge@osmocom.org>2021-02-02 16:32:55 +0000
commit9484ad9a876f9012d84cdc0c84b15f75774f537f (patch)
tree1e0f2086bd51efc1d502391778ef7cdbefe6609a
parentd2a85888aa3b6ec68503518113b04909a9c2223e (diff)
mncc: Fix write len
Fixes bug introduced recently. Closes: OS#4957 Fixes: 0f27b1bd397f5b54fdfabf447d6fca7f30ac2580 Change-Id: Ibbff004e2b76fbfe8962d14628c916afb19f30e6
-rw-r--r--src/mncc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mncc.c b/src/mncc.c
index 6d42fde..9d75950 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -160,7 +160,7 @@ static int mncc_rtp_write(struct mncc_connection *conn, struct gsm_mncc_rtp *rtp
{
int rc;
- rc = write(conn->fd.fd, &rtp, sizeof(rtp));
+ rc = write(conn->fd.fd, rtp, sizeof(*rtp));
LOGP(DMNCC, LOGL_DEBUG, "MNCC sent message type: %s\n", osmo_mncc_name(rtp->msg_type));
if (rc != sizeof(*rtp)) {
LOGP(DMNCC, LOGL_ERROR, "Failed to send message for call(%u): %d\n", rtp->callref, rc);