From 1bd26902d259e8688bfe2eef4236986153c6208f Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Thu, 14 Jan 2021 03:36:18 +0100 Subject: [PATCH] mncc: mncc_create_remote_leg: use mncc_write instead of write direct to the fd Change-Id: I870c16d7ee5e5424304f3c1c9fb78af418ae2577 --- src/mncc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mncc.c b/src/mncc.c index 83cfe3b..abfa01b 100644 --- a/src/mncc.c +++ b/src/mncc.c @@ -922,11 +922,10 @@ int mncc_create_remote_leg(struct mncc_connection *conn, struct call *call) * - Screening, redirect? * - Synth. the bearer caps based on codecs? */ - rc = write(conn->fd.fd, &mncc, sizeof(mncc)); + rc = mncc_write(conn, &mncc); if (rc != sizeof(mncc)) { LOGP(DMNCC, LOGL_ERROR, "Failed to send message leg(%u)\n", leg->callref); - close_connection(conn); talloc_free(leg); return -1; }