diff options
author | Martin Baulig <martin@src.gnome.org> | 1999-02-19 22:34:52 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1999-02-19 22:34:52 +0000 |
commit | 3c9b2e3d9fa78f38ee22fc29e620617730b897a8 (patch) | |
tree | b8e27dcee268dede2724586689d46c33f21b1adc /src/daemon/version.c | |
parent | 35995577ca5f42fb8ee6d38501c34c9d5ad588f1 (diff) | |
download | libgtop-3c9b2e3d9fa78f38ee22fc29e620617730b897a8.tar.gz |
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.
Diffstat (limited to 'src/daemon/version.c')
-rw-r--r-- | src/daemon/version.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/daemon/version.c b/src/daemon/version.c index 5c95cad7..e6cdb7ff 100644 --- a/src/daemon/version.c +++ b/src/daemon/version.c @@ -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; |