/*
- * $Id: status.c,v 1.4.2.4 2002-02-09 05:35:17 jmarcus Exp $
+ * $Id: status.c,v 1.4.2.5 2002-02-11 17:46:40 jmarcus Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include "afp_config.h"
#include "icon.h"
-static void status_flags(char *data, const int ipok,
+static void status_flags(char *data, const int notif, const int ipok,
const unsigned char passwdbits)
{
u_int16_t status;
if (ipok)
status |= AFPSRVRINFO_TCPIP;
status |= AFPSRVRINFO_SRVMSGS;
- status |= AFPSRVRINFO_SRVNOTIFY;
+ /* 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_FASTBOZO;
status = htons(status);
memcpy(data + AFPSTATUS_FLAGOFF, &status, sizeof(status));
* (16-bytes), network addresses, volume icon/mask
*/
- status_flags(status, options->fqdn ||
+ status_flags(status, options->server_notif, options->fqdn ||
(dsiconfig && dsi->server.sin_addr.s_addr),
options->passwdbits);
/* returns offset to signature offset */