2 * $Id: asp_close.c,v 1.5 2009-10-13 22:55:37 didg Exp $
4 * Copyright (c) 1990,1991 Regents of The University of Michigan.
7 * Permission to use, copy, modify, and distribute this software and
8 * its documentation for any purpose and without fee is hereby granted,
9 * provided that the above copyright notice appears in all copies and
10 * that both that copyright notice and this permission notice appear
11 * in supporting documentation, and that the name of The University
12 * of Michigan not be used in advertising or publicity pertaining to
13 * distribution of the software without specific, written prior
14 * permission. This software is supplied as is without expressed or
15 * implied warranties of any kind.
17 * Research Systems Unix Group
18 * The University of Michigan
20 * 535 W. William Street
23 * netatalk@itd.umich.edu
28 #endif /* HAVE_CONFIG_H */
32 #include <sys/types.h>
35 #include <sys/socket.h>
37 #include <netatalk/at.h>
38 #include <atalk/atp.h>
39 #include <atalk/asp.h>
41 int asp_close(ASP asp)
43 struct atp_block atpb;
44 struct iovec iov[ 1 ];
47 memset(asp->commands, 0, sizeof(u_int32_t));
49 atpb.atp_saddr = &asp->asp_sat;
50 iov[ 0 ].iov_base = asp->commands;
51 iov[ 0 ].iov_len = sizeof(u_int32_t);
52 atpb.atp_sresiov = iov;
53 atpb.atp_sresiovcnt = 1;
55 if (atp_sresp( asp->asp_atp, &atpb ) < 0)
58 if (atp_close( asp->asp_atp ) < 0)