]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add last callback run stamp to device records
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 6 Jun 2013 18:08:59 +0000 (13:08 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 6 Jun 2013 18:08:59 +0000 (13:08 -0500)
src/include/switch_core.h
src/switch_channel.c

index 39fab1e7cd7e1a885647f33446f22d678714b7db..b67b4865b5fd9d49fea20f5d8de3627358d7593a 100644 (file)
@@ -103,6 +103,7 @@ typedef struct switch_device_record_s {
        switch_device_state_t last_state;
        switch_time_t active_start;
        switch_time_t active_stop;
+       switch_time_t last_call_time;
        struct device_uuid_node_s *uuid_list;
        struct device_uuid_node_s *uuid_tail;
        switch_mutex_t *mutex;
index f2e509d5183e3e1ff9034e64a3e7208aabf99973..6550452e6621b75a46ebf2d21293f2d0c71ba264 100644 (file)
@@ -4795,6 +4795,8 @@ static void switch_channel_check_device_state(switch_channel_t *channel, switch_
                }
        }
 
+       drec->last_call_time = switch_micro_time_now();
+
        drec->last_state = drec->state;
 
        switch_mutex_unlock(drec->mutex);