]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix MODAPP-78
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 26 Feb 2008 21:55:59 +0000 (21:55 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 26 Feb 2008 21:55:59 +0000 (21:55 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7750 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_channel.c

index 2d8d1494a0e839e410f3033b24e30cbc8ec1037b..eb3d6a98ddcb760d0ef169881d0b1aeca4c7def2 100644 (file)
@@ -1937,9 +1937,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_set_timestamps(switch_channel_t *
                switch_strftime(profile_start, &retsize, sizeof(profile_start), fmt, &tm);
                switch_channel_set_variable(channel, "profile_start_stamp", profile_start);
 
-               switch_time_exp_lt(&tm, caller_profile->times->answered);
-               switch_strftime(answer, &retsize, sizeof(answer), fmt, &tm);
-               switch_channel_set_variable(channel, "answer_stamp", answer);
+               if (caller_profile->times->answered) {
+                       switch_time_exp_lt(&tm, caller_profile->times->answered);
+                       switch_strftime(answer, &retsize, sizeof(answer), fmt, &tm);
+                       switch_channel_set_variable(channel, "answer_stamp", answer);
+               }
 
                switch_time_exp_lt(&tm, caller_profile->times->hungup);
                switch_strftime(end, &retsize, sizeof(end), fmt, &tm);