dect
/
asterisk
Archived
13
0
Fork 0

chan_dect: fix codec-list parsing

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy 2010-10-09 04:51:56 +02:00
parent 438e90d735
commit 7f95e315e4
1 changed files with 4 additions and 1 deletions

View File

@ -452,7 +452,7 @@ static int dect_db_parse_codec_list(struct dect_pt *pt, const char *key,
cl = pt->codec_list;
}
tmp = strchr(val, '_');
tmp = strchr(key, '_');
if (tmp == NULL)
return -1;
strncpy(num, tmp + 1, sizeof(num));
@ -469,6 +469,9 @@ static int dect_db_parse_codec_list(struct dect_pt *pt, const char *key,
cl->entry[i].cplane = dect_parse_num(val);
else
return -1;
if (i + 1 > cl->num)
cl->num = i + 1;
return 0;
}