From: Mariusz Bialonczyk Date: Thu, 22 Jan 2015 10:13:20 +0000 (+0100) Subject: capmt: network mode: fix a crash when oscam is restarted X-Git-Tag: v4.1~440 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F587%2Fhead;p=thirdparty%2Ftvheadend.git capmt: network mode: fix a crash when oscam is restarted Use capmt_queue_msg() after connecting instead of direct write to socket. Fixes a crash when the channel is played and oscam is restarted. --- diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c index a6702e457..f7e773280 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -797,7 +797,7 @@ capmt_send_client_info(capmt_t *capmt) int len = snprintf(buf + 7, sizeof(buf) - 7, "Tvheadend %s", tvheadend_version); buf[6] = len; - capmt_write_msg(capmt, 0, 0, (uint8_t *)&buf, len + 7); + capmt_queue_msg(capmt, 0, 0, (uint8_t *)&buf, len + 7, CAPMT_MSG_FAST); } static void