afp_over_asp(&config->obj);
exit (0);
}
+
+ return 0;
}
#endif /* no afp/asp */
afp_over_dsi(&config->obj); /* start a session */
exit (0);
}
+
+ return 0;
}
#ifndef NO_DDP
case DSIFUNC_WRITE: /* FPWrite and FPAddIcon */
function = (u_char) dsi->commands[0];
if ( obj->options.flags & OPTION_DEBUG ) {
- printf("(write) command: %d, %ld\n", function, dsi->cmdlen);
+ printf("(write) command: %d, %d\n", function, dsi->cmdlen);
bprint(dsi->commands, dsi->cmdlen);
}
#include <netdb.h>
#include <atalk/paths.h>
+#include <atalk/util.h>
#include "globals.h"
#include "status.h"
#include "auth.h"
if ((c = getoption(buf, "-tickleval")))
options->tickleval = atoi(c);
- if (c = getoption(buf, "-server_quantum"))
+ if ((c = getoption(buf, "-server_quantum")))
options->server_quantum = strtoul(c, NULL, 0);
if ((c = getoption(buf, "-nlspath")) && (opt = strdup(c)))
options->nlspath = opt;
- if (c = getoption(buf, "-ipaddr")) {
+ if ((c = getoption(buf, "-ipaddr"))) {
struct in_addr inaddr;
if (inet_aton(c, &inaddr) && (opt = strdup(c))) {
if (!gethostbyaddr((const char *) &inaddr, sizeof(inaddr), AF_INET))
if ((c = getoption(buf, "-port")))
options->port = atoi(c);
- if (c = getoption(buf, "-ddpaddr"))
+ if ((c = getoption(buf, "-ddpaddr")))
atalk_aton(c, &options->ddpaddr);
/* do a little checking for the domain name. */
- if (c = getoption(buf, "-fqdn")) {
+ if ((c = getoption(buf, "-fqdn"))) {
char *p = strchr(c, ':');
if (p)
*p = '\0';
if (gethostbyname(c)) {
if (p)
*p = ':';
- if (opt = strdup(c))
+ if ((opt = strdup(c)))
options->fqdn = opt;
}
}
obj->reply(obj->handle, err);
obj->exit(0);
+
+ return AFP_OK;
}
static int login(AFPObj *obj, struct passwd *pwd, void (*logout)(void))
{
syslog(LOG_INFO, "logout %s", obj->username);
obj->exit(0);
+ return AFP_OK;
}
if ((stat(name, &st) == 0) && (mod = uam_load(name, p))) {
*/
if (stat(name, &st) == 0) {
- if (mod = uam_load(name, p)) {
+ if ((mod = uam_load(name, p))) {
uam_attach(&uam_modules, mod);
syslog(LOG_INFO, "uam: %s loaded", p);
} else {
}
p = strtok(NULL, ",");
}
+
+ return 0;
}
/* get rid of all of the uams */
/*
- * $Id: codepage.c,v 1.3 2001-02-23 15:35:37 rufustfirefly Exp $
+ * $Id: codepage.c,v 1.4 2001-05-31 18:48:32 srittau Exp $
*
* Copyright (c) 2000 Adrian Sun
* All Rights Reserved. See COPYRIGHT.
static int add_code(struct codepage *page, unsigned char *from,
unsigned char *to)
{
+#if 0
union codepage_val *ptr;
+#endif
if (page->quantum < 1) /* no quantum given. don't do anything */
return 1;
map[*from].hash
}
#endif
+ return 0;
}
static struct codepage *init_codepage(const int quantum)
/*
- * $Id: desktop.c,v 1.3 2001-02-23 15:35:37 rufustfirefly Exp $
+ * $Id: desktop.c,v 1.4 2001-05-31 18:48:32 srittau Exp $
* See COPYRIGHT.
*/
syslog(LOG_INFO, "afp_geticon: %m");
dsi_readdone(dsi);
obj->exit(1);
+ return AFP_OK;
} else {
if ( read( si.sdt_fd, rbuf, rc ) < rc ) {
dir->d_back = left;
}
+#if 0
/* recolor after a removal */
static struct dir *dir_rmrecolor(vol, dir)
struct vol *vol;
}
}
dir->d_color = DIRTREE_COLOR_BLACK;
+
+ return dir;
}
+#endif
/* remove the node from the tree. this is just like insertion, but
#endif
#endif
- if (edir = dirinsert( vol, cdir )) {
+ if ((edir = dirinsert( vol, cdir ))) {
if (edir->d_name) {
if (strcmp(edir->d_name, cdir->d_name)) {
syslog(LOG_INFO, "WARNING: DID conflict for '%s' and '%s'. Are these the same file?", edir->d_name, cdir->d_name);
/*
- * $Id: file.c,v 1.19 2001-04-03 13:20:44 rufustfirefly Exp $
+ * $Id: file.c,v 1.20 2001-05-31 18:48:32 srittau Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
struct dir *dir;
char *newname, *path, *p;
u_int32_t sdid, ddid;
- int plen, err, did, retvalue = AFP_OK;
+ int plen, err, retvalue = AFP_OK;
u_int16_t svid, dvid;
#ifdef DEBUG
char *oldname, *newname;
char *path, *p, *upath;
int did, rc;
- int plen, retvalue;
+ int plen;
u_int16_t vid;
#if AD_VERSION > AD_VERSION1
cnid_t id;
/*
- * $Id: uam.c,v 1.7 2001-04-10 18:07:06 rufustfirefly Exp $
+ * $Id: uam.c,v 1.8 2001-05-31 18:48:32 srittau Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
setpwent();
while ((pwent = getpwent())) {
- if (user = strchr(pwent->pw_gecos, ','))
+ if ((user = strchr(pwent->pw_gecos, ',')))
*user = '\0';
user = pwent->pw_gecos;
break;
case UAM_OPTION_PROTOCOL:
- *buf = obj->proto;
+ *buf = (void *) obj->proto;
break;
case UAM_OPTION_COOKIE:
goto uam_afp_read_err;
}
- while (len = (dsi_write(obj->handle, buf, *buflen))) {
+ while ((len = (dsi_write(obj->handle, buf, *buflen)))) {
if ((len = action(handle, buf, len)) < 0) {
dsi_writeflush(obj->handle);
goto uam_afp_read_err;
* Calculate the mode for a directory using Posix access() calls to
* estimate permission, a la mdw.
*/
-accessmode( path, ma, dir )
+void accessmode( path, ma, dir )
char *path;
struct maccess *ma;
struct dir *dir;
ma->ma_owner |= AR_UWRITE;
}
}
-
- return;
}
int gmem( gid )
const mode_t mode;
const int dropbox;
{
- int uid, retval;
+ int retval;
/* Turn on the sticky bit if this is a drop box, also turn off the setgid bit */
retval=0;
} /* end if not & S_IROTH */
} else { /* end if S_IWOTH and not S_IROTH */
#endif DROPKLUDGE
- if ( retval=chmod( name, DIRBITS | mode ) < 0 ) {
+ if ( (retval=chmod( name, DIRBITS | mode )) < 0 ) {
syslog( LOG_ERR, "stickydirmode: chmod \"%s\": %m", name );
}
#ifdef DROPKLUDGE
/*
- * $Id: volume.c,v 1.6 2001-03-07 15:36:54 rufustfirefly Exp $
+ * $Id: volume.c,v 1.7 2001-05-31 18:48:32 srittau Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
#include <netatalk/endian.h>
#include <atalk/asp.h>
#include <atalk/dsi.h>
destlen -= len;
}
} else if (is_var(p, "$f")) {
- if (q = strchr(pwd->pw_gecos, ','))
+ if ((q = strchr(pwd->pw_gecos, ',')))
*q = '\0';
q = pwd->pw_gecos;
} else if (is_var(p, "$g")) {
/*
- * $Id: volume.h,v 1.3 2001-02-28 16:53:24 rufustfirefly Exp $
+ * $Id: volume.h,v 1.4 2001-05-31 18:48:32 srittau Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#ifdef __svr4__
int v_qfd;
#endif /*__svr4__*/
- void *v_gvs;
+ char *v_gvs;
u_int32_t v_time;
int v_lastdid;
u_int16_t v_vid;
#include "atserv.h"
-aep_packet( ap, from, data, len )
+int aep_packet( ap, from, data, len )
struct atport *ap;
struct sockaddr_at *from;
char *data;
#include "atserv.h"
#include "main.h"
+/* Forward Declarations */
+int ifconfig(char *iname, unsigned long cmd, struct sockaddr_at *sa);
+
/* FIXME/SOCKLEN_T: socklen_t is a unix98 feature */
#ifndef SOCKLEN_T
#define SOCKLEN_T unsigned int