diff options
author | Robert S. French <rfrench@mit.edu> | 1987-08-01 07:35:45 +0000 |
---|---|---|
committer | Robert S. French <rfrench@mit.edu> | 1987-08-01 07:35:45 +0000 |
commit | f4bb54ce0fb10f1e0529bf84a19ec8088dbf41f9 (patch) | |
tree | 5d142604b665a0b6cb904a9588ef9cecb9710ce8 /server/main.c | |
parent | 28bcad1020be28f6b3fbd68a4ff803c0dffd267c (diff) |
Changed to handle new protocol and packet format
Diffstat (limited to 'server/main.c')
-rw-r--r-- | server/main.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/server/main.c b/server/main.c index 1245e55..4600a92 100644 --- a/server/main.c +++ b/server/main.c @@ -115,7 +115,7 @@ int argc; char **argv; { int nfound; /* #fildes ready on select */ - int authentic; /* authentic flag for ZParseNotice */ + int authentic; /* authentic flag */ Code_t status; ZNotice_t new_notice; /* parsed from input_packet */ ZPacket_t input_packet; /* from the network */ @@ -250,9 +250,7 @@ char **argv; npackets++; if (status = ZParseNotice(input_packet, input_len, - &new_notice, - &authentic, - &whoisit)) { + &new_notice)) { syslog(LOG_ERR, "bad notice parse: %s", error_message(status)); @@ -267,17 +265,14 @@ char **argv; input_sin.sin_addr.s_addr = new_notice.z_sender_addr.s_addr; input_sin.sin_port = new_notice.z_port; input_sin.sin_family = AF_INET; - if (status = ZParseNotice(input_packet, - input_len, - &new_notice, - &authentic, - &input_sin)) { - syslog(LOG_ERR, - "bad srv notice parse: %s", - error_message(status)); - continue; - } + authentic = ZCheckAuthentication(&new_notice, + input_packet, + &input_sin); } + else + authentic = ZCheckAuthentication(&new_notice, + input_packet, + &whoisit); if (whoisit.sin_port != hm_port && strcmp(new_notice.z_class,ZEPHYR_ADMIN_CLASS) && whoisit.sin_port != sock_sin.sin_port && |