summaryrefslogtreecommitdiff
path: root/server/dispatch.c
diff options
context:
space:
mode:
authorGravatar Greg Hudson <ghudson@mit.edu>1998-07-16 10:55:05 +0000
committerGravatar Greg Hudson <ghudson@mit.edu>1998-07-16 10:55:05 +0000
commit7b0a769146e55626dcb495b3d31bf9d956c1ada9 (patch)
tree91dc58e5252fd0041986b5f3cf9b9337cc3dc938 /server/dispatch.c
parent4fdf8f9d3fa9fd576e93e41cd9c4c97b6c931a7e (diff)
Eliminate some cruft: nuke two unused fields in the client structure
and rename client_which_client() to client_find() and make the second argument a port instead of a notice.
Diffstat (limited to 'server/dispatch.c')
-rw-r--r--server/dispatch.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/server/dispatch.c b/server/dispatch.c
index 5523e1b..50769a7 100644
--- a/server/dispatch.c
+++ b/server/dispatch.c
@@ -676,7 +676,6 @@ rexmit(arg)
{
Unacked *nacked = (Unacked *) arg;
int retval;
- ZNotice_t dummy_notice;
Client *client;
#if 1
@@ -688,9 +687,8 @@ rexmit(arg)
nacked->rexmits++;
if (rexmit_times[nacked->rexmits] == -1) {
/* Unresponsive client, find it in our database. */
- dummy_notice.z_port = nacked->dest.addr.sin_port;
- client = client_which_client(&nacked->dest.addr.sin_addr,
- &dummy_notice);
+ client = client_find(&nacked->dest.addr.sin_addr,
+ nacked->dest.addr.sin_port);
/* unlink & free nacked */
LIST_DELETE(nacked);
@@ -1035,7 +1033,7 @@ control_dispatch(notice, auth, who, server)
return ZERR_NONE;
}
} else if (strcmp(opcode, CLIENT_UNSUBSCRIBE) == 0) {
- client = client_which_client(&who->sin_addr, notice);
+ client = client_find(&who->sin_addr, notice->z_port);
if (client != NULL) {
if (strcmp(client->principal->string, notice->z_sender) != 0) {
/* you may only cancel for your own clients */
@@ -1063,7 +1061,7 @@ control_dispatch(notice, auth, who, server)
}
} else if (strcmp(opcode, CLIENT_CANCELSUB) == 0) {
/* canceling subscriptions implies I can punt info about this client */
- client = client_which_client(&who->sin_addr, notice);
+ client = client_find(&who->sin_addr, notice->z_port);
if (client == NULL) {
#if 0
zdbug((LOG_DEBUG,"can_sub not found client"));