X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fafpd%2Fswitch.c;h=ab6917f53e7d8feacba70b40e84491229ea973b5;hb=1db2f6dcdd7ee7f6966a72c5aa1d49454e982b87;hp=84cc5a7fdbac8a0ad73c8c4e22676cd833e70167;hpb=c54cf2f183033a1d9b18abe71c70c805a6e57938;p=netatalk.git diff --git a/etc/afpd/switch.c b/etc/afpd/switch.c index 84cc5a7f..ab6917f5 100644 --- a/etc/afpd/switch.c +++ b/etc/afpd/switch.c @@ -1,5 +1,5 @@ /* - * $Id: switch.c,v 1.3 2001-06-20 18:33:04 rufustfirefly Exp $ + * $Id: switch.c,v 1.3.2.1 2001-12-03 05:01:04 jmarcus Exp $ * * Copyright (c) 1990,1991 Regents of The University of Michigan. * All Rights Reserved. @@ -48,9 +48,9 @@ #include "misc.h" static int afp_null(obj, ibuf, ibuflen, rbuf, rbuflen ) - AFPObj *obj; - char *ibuf, *rbuf; - int ibuflen, *rbuflen; +AFPObj *obj; +char *ibuf, *rbuf; +int ibuflen, *rbuflen; { syslog( LOG_INFO, "afp_null handle %d", *ibuf ); *rbuflen = 0; @@ -140,7 +140,7 @@ int (*postauth_switch[])() = { afp_logout, afp_mapid, afp_mapname, afp_moveandrename, /* 16 - 23 */ afp_openvol, afp_opendir, afp_openfork, afp_read, afp_rename, afp_setdirparams, afp_setfilparams, afp_setforkparams, - /* 24 - 31 */ + /* 24 - 31 */ afp_setvolparams, afp_write, afp_getfildirparams, afp_setfildirparams, afp_changepw, afp_getuserinfo, afp_getsrvrmesg, afp_createid, /* 32 - 39 */ afp_deleteid, afp_resolveid, afp_exchangefiles, afp_null /*afp_catsearch*/, @@ -203,26 +203,26 @@ int (*postauth_switch[])() = { /* add a new function if it's specified. return the old function in * "old" if there's a pointer there. */ int uam_afpserver_action(const int id, const int which, - int (**new)(), int (**old)()) + int (**new)(), int (**old)()) { - switch (which) { - case UAM_AFPSERVER_PREAUTH: - if (old) - *old = preauth_switch[id]; - if (new) - preauth_switch[id] = *new; - break; - case UAM_AFPSERVER_POSTAUTH: - if (old) - *old = postauth_switch[id]; - if (new) - postauth_switch[id] = *new; - break; - default: - syslog(LOG_DEBUG, "uam_afpserver_action: unknown switch %d[%d]", - which, id); - return -1; - } + switch (which) { + case UAM_AFPSERVER_PREAUTH: + if (old) + *old = preauth_switch[id]; + if (new) + preauth_switch[id] = *new; + break; + case UAM_AFPSERVER_POSTAUTH: + if (old) + *old = postauth_switch[id]; + if (new) + postauth_switch[id] = *new; + break; + default: + syslog(LOG_DEBUG, "uam_afpserver_action: unknown switch %d[%d]", + which, id); + return -1; + } - return 0; + return 0; }