mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Merged revisions 50495,50506 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r50495 | crichter | 2007-01-11 14:27:52 +0100 (Do, 11 Jan 2007) | 6 lines * more additions to make the RESTART message work * added fix for misdn_call to allow SETUPs with empty extensions, replaced the strtok_r functions with strsep for that (inspired by Sandro Cappellazzo, thanks) ........ r50506 | crichter | 2007-01-11 15:45:38 +0100 (Do, 11 Jan 2007) | 1 line when we get L2 UP, the L1 is UP definitely too, so we set the L1 state up as well. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1879,23 +1879,21 @@ static int misdn_call(struct ast_channel *ast, char *dest, int timeout)
|
||||
int r;
|
||||
struct chan_list *ch=MISDN_ASTERISK_TECH_PVT(ast);
|
||||
struct misdn_bchannel *newbc;
|
||||
char *opts=NULL, *ext,*tokb;
|
||||
char *opts=NULL, *ext;
|
||||
char dest_cp[256];
|
||||
|
||||
{
|
||||
strncpy(dest_cp,dest,sizeof(dest_cp)-1);
|
||||
dest_cp[sizeof(dest_cp)]=0;
|
||||
|
||||
ext=strtok_r(dest_cp,"/",&tokb);
|
||||
|
||||
|
||||
ext=dest_cp;
|
||||
strsep(&ext,"/");
|
||||
if (ext) {
|
||||
ext=strtok_r(NULL,"/",&tokb);
|
||||
if (ext) {
|
||||
opts=strtok_r(NULL,"/",&tokb);
|
||||
} else {
|
||||
chan_misdn_log(0,0,"misdn_call: No Extension given!\n");
|
||||
return -1;
|
||||
}
|
||||
opts=ext;
|
||||
strsep(&opts,"/");
|
||||
} else {
|
||||
ast_log(LOG_WARNING, "Malformed dialstring\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user