mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
Version 0.2.0 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1463,6 +1463,7 @@ static int pbx_load_module(void)
|
||||
{
|
||||
struct ast_config *cfg;
|
||||
struct ast_variable *v;
|
||||
char *ptrptr;
|
||||
char *cxt, *ext, *pri, *appl, *data, *tc, *cidmatch;
|
||||
struct ast_context *con;
|
||||
|
||||
@@ -1485,17 +1486,22 @@ static int pbx_load_module(void)
|
||||
while(v) {
|
||||
if (!strcasecmp(v->name, "exten")) {
|
||||
tc = strdup(v->value);
|
||||
ext = strtok(tc, ",");
|
||||
ext = strtok_r(tc, ",",&ptrptr);
|
||||
if (!ext)
|
||||
ext="";
|
||||
pri = strtok(NULL, ",");
|
||||
pri = strtok_r(NULL, ",",&ptrptr);
|
||||
if (!pri)
|
||||
pri="";
|
||||
appl = strtok(NULL, ",");
|
||||
appl = strtok_r(NULL, ",",&ptrptr);
|
||||
if (!appl)
|
||||
appl="";
|
||||
data = strtok(NULL, ",");
|
||||
|
||||
if (*ptrptr=='"') {
|
||||
ptrptr++;
|
||||
data = strtok_r(NULL, "\"",&ptrptr);
|
||||
ptrptr++;
|
||||
} else {
|
||||
data = strtok_r(NULL, ",",&ptrptr);
|
||||
}
|
||||
cidmatch = strchr(ext, '/');
|
||||
if (cidmatch) {
|
||||
*cidmatch = '\0';
|
||||
|
Reference in New Issue
Block a user