]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6413 update presence_epoch to lock to midnite
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 2 May 2014 18:49:41 +0000 (23:49 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 2 May 2014 18:49:46 +0000 (23:49 +0500)
src/mod/endpoints/mod_sofia/mod_sofia.c

index 700000f0777f2d134ca2e3ea2702dfd47c2de6e1..5bf7033adbb3a4f0f3c7f425fba3128c074caec9 100644 (file)
@@ -5564,7 +5564,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
        now = switch_epoch_time_now(NULL);
        tm = *(localtime(&now));
 
-       mod_sofia_globals.presence_epoch = now - (tm.tm_yday * 86400);
+       mod_sofia_globals.presence_epoch = now - (tm.tm_yday * 86400) - (tm.tm_hour * 60 * 60) - (tm.tm_min * 60) - tm.tm_sec;
 
        switch_find_local_ip(mod_sofia_globals.guess_ip, sizeof(mod_sofia_globals.guess_ip), &mod_sofia_globals.guess_mask, AF_INET);
        in.s_addr = mod_sofia_globals.guess_mask;