[Telepathy-commits] [telepathy-gabble/master] JingleMediaRtp: signal error if media type is unrecognized

Senko Rasic senko at phyrexia.lan
Tue Dec 2 04:34:01 PST 2008


---
 src/jingle-media-rtp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/jingle-media-rtp.c b/src/jingle-media-rtp.c
index 8456130..425c519 100644
--- a/src/jingle-media-rtp.c
+++ b/src/jingle-media-rtp.c
@@ -233,6 +233,11 @@ parse_description (GabbleJingleContent *content,
           mtype = JINGLE_MEDIA_TYPE_AUDIO;
       else if (!tp_strdiff (type, "video"))
           mtype = JINGLE_MEDIA_TYPE_VIDEO;
+      else
+        {
+          SET_BAD_REQ("unknown media type %s", type);
+          return;
+        }
     }
   else if (lm_message_node_has_namespace (desc_node,
         NS_JINGLE_DESCRIPTION_AUDIO, NULL))
-- 
1.5.6.5




More information about the Telepathy-commits mailing list