asdfuser pushed a commit to branch master.
commit 16cbbb202fcd47437bac699e5a8fcd209ed3d0e6
Author: Daniel Willmann <[email protected]>
Date: Fri May 24 16:06:51 2013 +0100
ecore_con: Server start time was not initialized correctly
ecore_con_event_server_add() is never called (at least not in the
standard TCP connection case, so initialize svr->start_time in
ecore_con_server_add(). This shouldn't regress any other behaviour as
this is done at the very beginning and any later change to start_time
will still happen.
Signed-off-by: Daniel Willmann <[email protected]>
---
ChangeLog | 4 ++++
NEWS | 2 ++
src/lib/ecore_con/ecore_con.c | 1 +
3 files changed, 7 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 1e5e0a5..4a089a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-05-24 Daniel Willmann
+ * Fix srv->start_time (initialization missing). So now
+ ecore_con_server_uptime_get() is working for plain TCP connections.
+
2013-05-24 Guillaume Friloux
* Fix use of ecore_con_server_client_limit_set() (counter never
decreased).
diff --git a/NEWS b/NEWS
index ccb9af6..a5a1f64 100644
--- a/NEWS
+++ b/NEWS
@@ -278,3 +278,5 @@ Fixes:
connections even if you sent data.
* Fix cl->start_time (initialization missing). So now
ecore_con_client_uptime_get() is working.
+ * Fix srv->start_time (initialization missing). So now
+ ecore_con_server_uptime_get() is working for plain TCP connections.
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 76550ee..5265896 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -364,6 +364,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
if (!svr->name)
goto error;
+ svr->start_time = ecore_time_get();
svr->type = compl_type;
svr->port = port;
svr->data = (void *)data;
--
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may