mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Warning be gone!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
15
main/frame.c
15
main/frame.c
@@ -1251,24 +1251,19 @@ int ast_codec_choose(struct ast_codec_pref *pref, int formats, int find_best)
|
|||||||
|
|
||||||
void ast_parse_allow_disallow(struct ast_codec_pref *pref, int *mask, const char *list, int allowing)
|
void ast_parse_allow_disallow(struct ast_codec_pref *pref, int *mask, const char *list, int allowing)
|
||||||
{
|
{
|
||||||
char *parse;
|
char *parse = NULL, *this = NULL, *psize = NULL;
|
||||||
char *this;
|
int format = 0, framems = 0;
|
||||||
int format;
|
|
||||||
char *psize;
|
|
||||||
int framems;
|
|
||||||
|
|
||||||
parse = ast_strdupa(list);
|
parse = ast_strdupa(list);
|
||||||
while ((this = strsep(&parse, ","))) {
|
while ((this = strsep(&parse, ","))) {
|
||||||
framems = 0;
|
framems = 0;
|
||||||
if ((psize = strrchr(this, ':'))) {
|
if ((psize = strrchr(this, ':'))) {
|
||||||
*psize = '\0';
|
*psize++ = '\0';
|
||||||
psize++;
|
|
||||||
if (option_debug)
|
if (option_debug)
|
||||||
ast_log(LOG_DEBUG,"Packetization for codec: %s is %s\n", this, psize);
|
ast_log(LOG_DEBUG,"Packetization for codec: %s is %s\n", this, psize);
|
||||||
framems = strtol(psize,NULL,10);
|
framems = atoi(psize);
|
||||||
if (framems == LONG_MIN || framems == LONG_MAX) {
|
if (framems < 0)
|
||||||
framems = 0;
|
framems = 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!(format = ast_getformatbyname(this))) {
|
if (!(format = ast_getformatbyname(this))) {
|
||||||
ast_log(LOG_WARNING, "Cannot %s unknown format '%s'\n", allowing ? "allow" : "disallow", this);
|
ast_log(LOG_WARNING, "Cannot %s unknown format '%s'\n", allowing ? "allow" : "disallow", this);
|
||||||
|
Reference in New Issue
Block a user