From 8121744451f7f8e7b5d670b7fe257a8a33af6a17 Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Date: Thu, 23 Jun 2011 16:28:55 -0400
Subject: [PATCH] * #6269: removed useless type testing

---
 .../src/audio/audiortp/AudioRtpFactory.cpp    | 32 ++-----------------
 1 file changed, 2 insertions(+), 30 deletions(-)

diff --git a/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp b/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp
index 68b7675be8..aa60edf0bf 100644
--- a/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp
+++ b/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp
@@ -319,40 +319,12 @@ void AudioRtpFactory::setRemoteCryptoInfo (sfl::SdesNegotiator& nego)
 
 void AudioRtpFactory::setDtmfPayloadType(unsigned int payloadType)
 {
-    switch (_rtpSessionType) {
-
-        case Sdes:
-            static_cast<AudioSrtpSession *> (_rtpSession)->setDtmfPayloadType(payloadType);
-            break;
-
-        case Symmetric:
-            static_cast<AudioRtpSession *> (_rtpSession)->setDtmfPayloadType(payloadType);
-            break;
-
-        case Zrtp:
-            static_cast<AudioZrtpSession *> (_rtpSession)->setDtmfPayloadType(payloadType);
-            break;
-    }
+    static_cast<AudioRtpRecordHandler *> (_rtpSession)->setDtmfPayloadType(payloadType);
 }
 
 void AudioRtpFactory::sendDtmfDigit (int digit)
 {
-
-    switch (_rtpSessionType) {
-
-        case Sdes:
-            static_cast<AudioSrtpSession *> (_rtpSession)->putDtmfEvent (digit);
-            break;
-
-        case Symmetric:
-            static_cast<AudioRtpSession *> (_rtpSession)->putDtmfEvent (digit);
-            break;
-
-        case Zrtp:
-            static_cast<AudioZrtpSession *> (_rtpSession)->putDtmfEvent (digit);
-            break;
-    }
-
+    static_cast<AudioRtpRecordHandler*> (_rtpSession)->putDtmfEvent (digit);
 }
 }
 
-- 
GitLab