include "logger.h" and errno.h from asterisk.h - usage shows that they
[asterisk/asterisk.git] / channels / chan_jingle.c
index e332159..f8072fd 100644 (file)
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
 #include <sys/socket.h>
-#include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
 #include <netinet/in.h>
@@ -54,11 +49,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/lock.h"
 #include "asterisk/channel.h"
 #include "asterisk/config.h"
-#include "asterisk/logger.h"
 #include "asterisk/module.h"
 #include "asterisk/pbx.h"
 #include "asterisk/options.h"
-#include "asterisk/lock.h"
 #include "asterisk/sched.h"
 #include "asterisk/io.h"
 #include "asterisk/rtp.h"
@@ -198,7 +191,7 @@ static int jingle_get_codec(struct ast_channel *chan);
 static const struct ast_channel_tech jingle_tech = {
        .type = "Jingle",
        .description = "Jingle Channel Driver",
-       .capabilities = ((AST_FORMAT_MAX_AUDIO << 1) - 1),
+       .capabilities = AST_FORMAT_AUDIO_MASK,
        .requester = jingle_request,
        .send_digit_begin = jingle_digit_begin,
        .send_digit_end = jingle_digit_end,
@@ -340,10 +333,7 @@ static int jingle_accept_call(struct jingle *client, struct jingle_pvt *p)
                                continue;
                        if (alreadysent & pref_codec)
                                continue;
-                       if (pref_codec <= AST_FORMAT_MAX_AUDIO)
-                               add_codec_to_answer(p, pref_codec, dcodecs);
-                       else
-                               add_codec_to_answer(p, pref_codec, dcodecs);
+                       add_codec_to_answer(p, pref_codec, dcodecs);
                        alreadysent |= pref_codec;
                }
                payload_red = iks_new("payload-type");