Fixed fault on wrong dial string.

This commit is contained in:
MelwareDE 2005-07-12 20:40:31 +00:00
parent 5a96c01fd8
commit 91817878d8
1 changed files with 6 additions and 1 deletions

View File

@ -1355,6 +1355,11 @@ struct ast_channel *capi_request(char *type, int format, void *data)
interface = strtok_r(buffer, "/", &buffer_rp);
dest = strtok_r(NULL, "/", &buffer_rp);
if ((!interface) || (!dest)) {
ast_log(LOG_ERROR,"Syntax error in dialstring. Read the docs!\n");
return NULL;
}
if (((char *)interface)[0] == 'g') {
interface++;
capigroup = ast_get_group(interface);
@ -1366,7 +1371,7 @@ struct ast_channel *capi_request(char *type, int format, void *data)
cc_ast_verbose(1, 1, VERBOSE_PREFIX_3 "capi request controller = %d\n",
controller);
} else {
ast_log(LOG_ERROR,"Syntax error in dialstring. read the docs!\n");
ast_log(LOG_ERROR,"Syntax error in dialstring. Read the docs!\n");
return NULL;
}