- init ocid to NULL and it may be set to empty string.
This commit is contained in:
parent
6085b31e81
commit
e6d47e7ecf
|
@ -815,7 +815,7 @@ static void parse_dialstring(char *buffer, char **interface, char **dest, char *
|
|||
|
||||
*dest = emptyid;
|
||||
*param = emptyid;
|
||||
*ocid = emptyid;
|
||||
*ocid = NULL;
|
||||
|
||||
while (*buffer_p) {
|
||||
if (*buffer_p == '/') {
|
||||
|
@ -841,7 +841,7 @@ static void parse_dialstring(char *buffer, char **interface, char **dest, char *
|
|||
*dest = oc + 1;
|
||||
}
|
||||
cc_verbose(3, 1, VERBOSE_PREFIX_4 "parsed dialstring: '%s' '%s' '%s' '%s'\n",
|
||||
*interface, *ocid, *dest, *param);
|
||||
*interface, (*ocid) ? *ocid : "NULL", *dest, *param);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -975,7 +975,7 @@ static int capi_call(struct ast_channel *c, char *idest, int timeout)
|
|||
|
||||
if (use_defaultcid) {
|
||||
strncpy(callerid, i->defaultcid, sizeof(callerid) - 1);
|
||||
} else if (strlen(ocid)) {
|
||||
} else if (ocid) {
|
||||
strncpy(callerid, ocid, sizeof(callerid) - 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue