From d939483328489fb835bb425d36f7c7c73d52c388 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 29 Jul 2008 20:14:27 +0200 Subject: Remove useless cstate.c file --- sdpd/service.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sdpd/service.c') diff --git a/sdpd/service.c b/sdpd/service.c index 002efc85..09459f43 100644 --- a/sdpd/service.c +++ b/sdpd/service.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -60,6 +61,23 @@ static sdp_version_t sdpVnumArray[1] = { }; static const int sdpServerVnumEntries = 1; +/* + * A simple function which returns the time of day in + * seconds. Used for updating the service db state + * attribute of the service record of the SDP server + */ +uint32_t sdp_get_time() +{ + /* + * To handle failure in gettimeofday, so an old + * value is returned and service does not fail + */ + static struct timeval tm; + + gettimeofday(&tm, NULL); + return (uint32_t) tm.tv_sec; +} + /* * The service database state is an attribute of the service record * of the SDP server itself. This attribute is guaranteed to -- cgit