[Core] fix crash when get channel var like bleg_created_time
This commit is contained in:
parent
c402ce1dee
commit
b09857c766
|
@ -285,6 +285,7 @@ SWITCH_DECLARE(const char *) switch_caller_get_field_by_name(switch_caller_profi
|
|||
if (!strcasecmp(name, "privacy_hide_number")) {
|
||||
return switch_test_flag(caller_profile, SWITCH_CPF_HIDE_NUMBER) ? "true" : "false";
|
||||
}
|
||||
if (caller_profile->times) {
|
||||
if (!strcasecmp(name, "profile_created_time")) {
|
||||
return switch_core_sprintf(caller_profile->pool, "%" SWITCH_TIME_T_FMT, caller_profile->times->profile_created);
|
||||
}
|
||||
|
@ -306,6 +307,7 @@ SWITCH_DECLARE(const char *) switch_caller_get_field_by_name(switch_caller_profi
|
|||
if (!strcasecmp(name, "transferred_time")) {
|
||||
return switch_core_sprintf(caller_profile->pool, "%" SWITCH_TIME_T_FMT, caller_profile->times->transferred);
|
||||
}
|
||||
}
|
||||
|
||||
if (caller_profile->soft && switch_test_flag(caller_profile, SWITCH_CPF_SOFT_LOOKUP)) {
|
||||
profile_node_t *pn;
|
||||
|
|
Loading…
Reference in New Issue