Bug 25372 - internal time service in inetd-0.16-7 is not working
Summary: internal time service in inetd-0.16-7 is not working
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: inetd   
(Show other bugs)
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-31 08:17 UTC by volf
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-31 14:42:24 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description volf 2001-01-31 08:17:59 UTC
Internal time service in inetd-0.16-7 is not working at all. This
"external" server:

==cut here==
#include <fcntl.h>
#include <sys/time.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <syslog.h>

/* functions machtime and machtime_stream are taken from inetd sources and
slightly modified */
static unsigned long machtime(void)
{
        struct timeval tv;

        if (gettimeofday(&tv, (struct timezone *)0) < 0) {
                syslog(LOG_ERR, "Unable to get time of day\n");
                return (0L);
        }
        return (htonl((unsigned long)tv.tv_sec + 2208988800UL));
}

void machtime_stream(int s)
{
        unsigned long result;

        result = machtime();
        write(s, (char *) &result, sizeof(result));
}

int main (int argc, char **argv)
{
        openlog ("mytimed", LOG_PID | LOG_ODELAY, LOG_DAEMON);

        machtime_stream(0);

        closelog();

        return 0;
}
==cut here==

IS working on the same machine. What's wrong?

Comment 1 volf 2001-01-31 14:42:19 UTC
Now it is working. I don't know why. Probably there is something wrong between
the keyboard and the chair ;-) Sorry.


Note You need to log in before you can comment on or make changes to this bug.