From 4b1b4f197a052f3110f3c243eabc1f9bed69cbff Mon Sep 17 00:00:00 2001 From: jmarcus Date: Sat, 9 Feb 2002 05:35:15 +0000 Subject: [PATCH 1/1] Revert server_notif code. We're testing something new in current, and it was naughty of me to commit this prematurely. --- NEWS | 4 ---- etc/afpd/afp_options.c | 6 +----- etc/afpd/globals.h | 4 ++-- etc/afpd/status.c | 15 ++++----------- etc/afpd/volume.c | 6 ++---- 5 files changed, 9 insertions(+), 26 deletions(-) diff --git a/NEWS b/NEWS index 2cf5103f..ef3fd975 100644 --- a/NEWS +++ b/NEWS @@ -3,10 +3,6 @@ Changes from 1.5.1 * NEW: NetBSD support contributed by David Rankin and NetBSD contributors. This includes a new configure option --enable-netbsd. -* NEW: -server_notif afpd flag has been added to control whether or not - you want the server to send notifications (this is the current way - of doing things). If you do not specify this flag (default), the - client will poll the server every 10 seconds for directory updates. * UPD: Use separate macro for AFS configure check. * UPD: Some Perl scripts are now (partially) auto-generated. This improves out-of-the-box usage of Netatalk. diff --git a/etc/afpd/afp_options.c b/etc/afpd/afp_options.c index b86c9b7a..0721a810 100644 --- a/etc/afpd/afp_options.c +++ b/etc/afpd/afp_options.c @@ -1,5 +1,5 @@ /* - * $Id: afp_options.c,v 1.13.2.4 2002-02-08 02:54:24 jmarcus Exp $ + * $Id: afp_options.c,v 1.13.2.5 2002-02-09 05:35:17 jmarcus Exp $ * * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * Copyright (c) 1990,1993 Regents of The University of Michigan. @@ -142,7 +142,6 @@ void afp_options_init(struct afp_options *options) options->passwdfile = _PATH_AFPDPWFILE; options->tickleval = 30; options->timeout = 4; - options->server_notif = 0; options->authprintdir = NULL; options->umask = 0; #ifdef ADMIN_GRP @@ -237,9 +236,6 @@ int afp_options_parseline(char *buf, struct afp_options *options) options->timeout = 4; } } - if ((c = getoption(buf, "-server_notif"))) { - options->server_notif = 1; - } if ((c = getoption(buf, "-server_quantum"))) options->server_quantum = strtoul(c, NULL, 0); diff --git a/etc/afpd/globals.h b/etc/afpd/globals.h index 3fb45b3d..991fc28c 100644 --- a/etc/afpd/globals.h +++ b/etc/afpd/globals.h @@ -1,5 +1,5 @@ /* - * $Id: globals.h,v 1.6.2.3 2002-02-08 02:54:24 jmarcus Exp $ + * $Id: globals.h,v 1.6.2.4 2002-02-09 05:35:17 jmarcus Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -40,7 +40,7 @@ /* a couple of these options could get stuck in unions to save * space. */ struct afp_options { - int connections, port, transports, tickleval, timeout, server_notif, flags; + int connections, port, transports, tickleval, timeout, flags; unsigned char passwdbits, passwdminlen, loginmaxfail; u_int32_t server_quantum; char hostname[MAXHOSTNAMELEN + 1], *server, *ipaddr, *configfile; diff --git a/etc/afpd/status.c b/etc/afpd/status.c index 291989d6..790b8c59 100644 --- a/etc/afpd/status.c +++ b/etc/afpd/status.c @@ -1,5 +1,5 @@ /* - * $Id: status.c,v 1.4.2.3 2002-02-08 02:54:24 jmarcus Exp $ + * $Id: status.c,v 1.4.2.4 2002-02-09 05:35:17 jmarcus Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -34,7 +34,7 @@ #include "afp_config.h" #include "icon.h" -static void status_flags(char *data, const int notif, const int ipok, +static void status_flags(char *data, const int ipok, const unsigned char passwdbits) { u_int16_t status; @@ -49,14 +49,7 @@ static void status_flags(char *data, const int notif, const int ipok, if (ipok) status |= AFPSRVRINFO_TCPIP; status |= AFPSRVRINFO_SRVMSGS; - /* Allow the user to decide if we should support server notifications. - * With this turned off, the clients will poll for directory changes every - * 10 seconds. This might be too costly to network resources, so make - * this an optional thing. Default will be to _not_ support server - * notifications. */ - if (notif) { - status |= AFPSRVRINFO_SRVNOTIFY; - } + status |= AFPSRVRINFO_SRVNOTIFY; status |= AFPSRVRINFO_FASTBOZO; status = htons(status); memcpy(data + AFPSTATUS_FLAGOFF, &status, sizeof(status)); @@ -325,7 +318,7 @@ void status_init(AFPConfig *aspconfig, AFPConfig *dsiconfig, * (16-bytes), network addresses, volume icon/mask */ - status_flags(status, options->server_notif, options->fqdn || + status_flags(status, options->fqdn || (dsiconfig && dsi->server.sin_addr.s_addr), options->passwdbits); /* returns offset to signature offset */ diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c index ff3fe170..23a34270 100644 --- a/etc/afpd/volume.c +++ b/etc/afpd/volume.c @@ -1,5 +1,5 @@ /* - * $Id: volume.c,v 1.14.2.5 2002-02-08 02:54:24 jmarcus Exp $ + * $Id: volume.c,v 1.14.2.6 2002-02-09 05:35:17 jmarcus Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -1308,9 +1308,7 @@ struct vol *vol; /* a little granularity */ if (vol->v_time < tv.tv_sec) { vol->v_time = tv.tv_sec; - if (obj->options.server_notif) { - obj->attention(obj->handle, AFPATTN_NOTIFY | AFPATTN_VOLCHANGED); - } + obj->attention(obj->handle, AFPATTN_NOTIFY | AFPATTN_VOLCHANGED); } } -- 2.39.2