summaryrefslogtreecommitdiff
path: root/server/bdump.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1987-08-03 08:07:38 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1987-08-03 08:07:38 +0000
commit3d059f5a3668bcd944e140d167df08e8f78094e8 (patch)
treef235397c90ea07811c017678ba22875ebf5a2e0b /server/bdump.c
parentd6a97078624a680d8fc8670db4b17941d2003562 (diff)
add a version number in the class instance
Diffstat (limited to 'server/bdump.c')
-rw-r--r--server/bdump.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/server/bdump.c b/server/bdump.c
index 388c708..af7f269 100644
--- a/server/bdump.c
+++ b/server/bdump.c
@@ -115,7 +115,8 @@ struct sockaddr_in *who;
}
/* myname is the hostname */
- (void) send_list(ACKED, sock_sin.sin_port, ZEPHYR_ADMIN_CLASS, "",
+ /* the class instance is the version number, here it is "1" */
+ (void) send_list(ACKED, sock_sin.sin_port, ZEPHYR_ADMIN_CLASS, "1",
ADMIN_BDUMP, myname, "", lyst, 2);
return;
@@ -242,6 +243,15 @@ ZServerDesc_t *server;
zdbug((LOG_DEBUG, "bdump avail"));
+ /* version number 1 is the same as no version number */
+ if (strcmp(notice->z_class_inst, "1")
+ && strcmp(notice->z_class_inst, "")) {
+ syslog(LOG_WARNING,
+ "Incompatible bdump version '%s' from %s",
+ notice->z_class_inst,
+ inet_ntoa(who->sin_addr));
+ return;
+ }
bdumping = 1;
(void) signal(SIGPIPE, SIG_IGN); /* so we can detect problems */