Module: sip-router
Branch: master
Commit: 7537d27782b185a20d32b08f7bcb30557bb3b7ff
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7537d27…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Jul 1 19:00:51 2010 +0200
kex: check if uptime value was initialized
---
modules_k/kex/mi_core.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules_k/kex/mi_core.c b/modules_k/kex/mi_core.c
index 7d9a09c..157d9f4 100644
--- a/modules_k/kex/mi_core.c
+++ b/modules_k/kex/mi_core.c
@@ -66,6 +66,8 @@ static int init_mi_uptime(void)
{
char *p;
+ if (kmi_up_since_ctime.s!=0)
+ return 0;
time(&kmi_up_since);
p = ctime(&kmi_up_since);
kmi_up_since_ctime.len = strlen(p)-1;