aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_nbs.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-06 19:38:33 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-06 19:38:33 +0000
commit16e3d97832263d09f4de243f636de380bee79b7a (patch)
tree3d6de262e7c263d476e08828d4b94ef1e90885c1 /channels/chan_nbs.c
parent9baa79d4f165d4c8cef0a6703948894d85356a6b (diff)
Missed these two channel drivers on the codec_bits merge
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@228616 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_nbs.c')
-rw-r--r--channels/chan_nbs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/channels/chan_nbs.c b/channels/chan_nbs.c
index 89c5f647c..882258f00 100644
--- a/channels/chan_nbs.c
+++ b/channels/chan_nbs.c
@@ -50,7 +50,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static const char tdesc[] = "Network Broadcast Sound Driver";
/* Only linear is allowed */
-static int prefformat = AST_FORMAT_SLINEAR;
+static format_t prefformat = AST_FORMAT_SLINEAR;
static char context[AST_MAX_EXTENSION] = "default";
static const char type[] = "NBS";
@@ -66,7 +66,7 @@ struct nbs_pvt {
struct ast_module_user *u; /*! for holding a reference to this module */
};
-static struct ast_channel *nbs_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *nbs_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause);
static int nbs_call(struct ast_channel *ast, char *dest, int timeout);
static int nbs_hangup(struct ast_channel *ast);
static struct ast_frame *nbs_xread(struct ast_channel *ast);
@@ -205,9 +205,9 @@ static int nbs_xwrite(struct ast_channel *ast, struct ast_frame *frame)
ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
return 0;
}
- if (!(frame->subclass &
+ if (!(frame->subclass.codec &
(AST_FORMAT_SLINEAR))) {
- ast_log(LOG_WARNING, "Cannot handle frames in %d format\n", frame->subclass);
+ ast_log(LOG_WARNING, "Cannot handle frames in %s format\n", ast_getformatname(frame->subclass.codec));
return 0;
}
if (ast->_state != AST_STATE_UP) {
@@ -251,16 +251,16 @@ static struct ast_channel *nbs_new(struct nbs_pvt *i, int state, const char *lin
}
-static struct ast_channel *nbs_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *nbs_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause)
{
- int oldformat;
+ format_t oldformat;
struct nbs_pvt *p;
struct ast_channel *tmp = NULL;
oldformat = format;
format &= (AST_FORMAT_SLINEAR);
if (!format) {
- ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%d'\n", oldformat);
+ ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%s'\n", ast_getformatname(oldformat));
return NULL;
}
p = nbs_alloc(data);