-#ifndef NO_DDP
- case AFPPROTO_ASP:
- buflen = bsize;
- if ((asp_wrtcont(obj->handle, rbuf, &buflen) < 0) || buflen != bsize)
- return( AFPERR_PARAM );
-
-#ifdef DEBUG1
- if (obj->options.flags & OPTION_DEBUG) {
- printf("(write) len: %d\n", buflen);
- bprint(rbuf, buflen);
- }
-#endif
-
- /*
- * We're at the end of the file, add the headers, etc. */
- if ( cc == 0 ) {
- iov[ 0 ].iov_base = (caddr_t)imh;
- iov[ 0 ].iov_len = sizeof( imh );
- iov[ 1 ].iov_base = rbuf;
- iov[ 1 ].iov_len = bsize;
- iovcnt = 2;
- }
-
- /*
- * We found an icon to replace.
- */
- if ( cc > 0 ) {
- iov[ 0 ].iov_base = rbuf;
- iov[ 0 ].iov_len = bsize;
- iovcnt = 1;
- }
-
- if ( writev( si.sdt_fd, iov, iovcnt ) < 0 ) {
- LOG(log_error, logtype_afpd, "afp_addicon(%s): writev: %s", icon_dtfile(vol, fcreator), strerror(errno) );
- return( AFPERR_PARAM );
- }
- break;
-#endif /* no afp/asp */