From 736a7b043a028eec91b98206855d6f8e241a8335 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Tue, 7 Mar 2006 22:13:55 +0000 Subject: [PATCH] only parse message if channel is connected --- src/channel.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/channel.cpp b/src/channel.cpp index 85e03e06..71cc0621 100755 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -350,14 +350,18 @@ for (int i = 0; i < BLOCK_SIZE_SAMPLES; i++) } else { - // this seems not to be an audio block, parse the message - if ( Protocol.ParseMessage ( vecbyData, iNumBytes ) ) + // only use protocol data if channel is connected + if ( IsConnected() ) { - eRet = PS_PROT_OK; - } - else - { - eRet = PS_PROT_ERR; + // this seems not to be an audio block, parse the message + if ( Protocol.ParseMessage ( vecbyData, iNumBytes ) ) + { + eRet = PS_PROT_OK; + } + else + { + eRet = PS_PROT_ERR; + } } }