diff options
author | John Kohl <jtkohl@mit.edu> | 1987-08-03 08:07:38 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1987-08-03 08:07:38 +0000 |
commit | 3d059f5a3668bcd944e140d167df08e8f78094e8 (patch) | |
tree | f235397c90ea07811c017678ba22875ebf5a2e0b /server/bdump.c | |
parent | d6a97078624a680d8fc8670db4b17941d2003562 (diff) |
add a version number in the class instance
Diffstat (limited to 'server/bdump.c')
-rw-r--r-- | server/bdump.c | 12 |
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 */ |