~ubuntu-branches/ubuntu/precise/netatalk/precise

« back to all changes in this revision

Viewing changes to libatalk/dsi/dsi_close.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2004-01-19 12:43:49 UTC
  • Revision ID: james.westby@ubuntu.com-20040119124349-es563jbp0hk0ae51
Tags: upstream-1.6.4
ImportĀ upstreamĀ versionĀ 1.6.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: dsi_close.c,v 1.3 2001/06/29 14:14:46 rufustfirefly Exp $
 
3
 *
 
4
 * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
 
5
 * All rights reserved. See COPYRIGHT.
 
6
 */
 
7
 
 
8
#ifdef HAVE_CONFIG_H
 
9
#include "config.h"
 
10
#endif /* HAVE_CONFIG_H */
 
11
 
 
12
#include <stdio.h>
 
13
#include <stdlib.h>
 
14
#include <atalk/dsi.h>
 
15
#include <netatalk/endian.h>
 
16
 
 
17
void dsi_close(DSI *dsi)
 
18
{
 
19
  /* server generated. need to set all the fields. */
 
20
  dsi->header.dsi_flags = DSIFL_REQUEST;
 
21
  dsi->header.dsi_command = DSIFUNC_CLOSE;
 
22
  dsi->header.dsi_requestID = htons(dsi_serverID(dsi));
 
23
  dsi->header.dsi_code = dsi->header.dsi_reserved = htonl(0);
 
24
  dsi->cmdlen = 0; 
 
25
 
 
26
  dsi_send(dsi);
 
27
  dsi->proto_close(dsi);
 
28
  free(dsi);
 
29
}