From 7b0a769146e55626dcb495b3d31bf9d956c1ada9 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Thu, 16 Jul 1998 10:55:05 +0000 Subject: 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. --- server/dispatch.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'server/dispatch.c') 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")); -- cgit v1.2.3