- init ocid to NULL and it may be set to empty string.

This commit is contained in:
MelwareDE 2005-12-07 06:00:25 +00:00
parent 6085b31e81
commit e6d47e7ecf
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}