Reverted my last brain-dead commit.

Logical error:

we need to check whether the server runs on the system it was
compiled on and not whether the client uses a server that was
compiled on the clients system.
This commit is contained in:
Martin Baulig
1999-02-19 22:34:52 +00:00
parent 35995577ca
commit 3c9b2e3d9f
3 changed files with 16 additions and 38 deletions

View File

@@ -23,25 +23,18 @@
#include <glibtop/error.h>
#include <glibtop/version.h>
#include <sys/utsname.h>
void
glibtop_send_version (glibtop *server, int fd)
{
char buffer [BUFSIZ+10];
struct utsname uts;
char buffer [BUFSIZ];
size_t size;
if (uname (&uts))
glibtop_error_io_r (server, "uname");
snprintf (buffer, BUFSIZ, LIBGTOP_VERSION_STRING,
LIBGTOP_VERSION, LIBGTOP_SERVER_VERSION,
sizeof (glibtop_command),
sizeof (glibtop_response),
sizeof (glibtop_union),
sizeof (glibtop_sysdeps),
uts.sysname, uts.release, uts.machine);
sprintf (buffer, LIBGTOP_VERSION_STRING,
LIBGTOP_VERSION, LIBGTOP_SERVER_VERSION,
sizeof (glibtop_command),
sizeof (glibtop_response),
sizeof (glibtop_union),
sizeof (glibtop_sysdeps));
size = strlen (buffer) + 1;