vserver 1.9.5.x5
[linux-2.6.git] / net / rxrpc / transport.c
index 5770015..9bce779 100644 (file)
@@ -39,7 +39,7 @@ struct errormsg {
        struct sockaddr_in              icmp_src;       /* ICMP packet source address */
 };
 
-static spinlock_t rxrpc_transports_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(rxrpc_transports_lock);
 static struct list_head rxrpc_transports = LIST_HEAD_INIT(rxrpc_transports);
 
 __RXACCT_DECL(atomic_t rxrpc_transport_count);
@@ -148,16 +148,6 @@ int rxrpc_create_transport(unsigned short port,
        return ret;
 } /* end rxrpc_create_transport() */
 
-/*****************************************************************************/
-/*
- * clear the connections on a transport endpoint
- */
-void rxrpc_clear_transport(struct rxrpc_transport *trans)
-{
-       //struct rxrpc_connection *conn;
-
-} /* end rxrpc_clear_transport() */
-
 /*****************************************************************************/
 /*
  * destroy a transport endpoint
@@ -457,8 +447,8 @@ void rxrpc_trans_receive_packet(struct rxrpc_transport *trans)
        struct rxrpc_peer *peer;
        struct sk_buff *pkt;
        int ret;
-       u32 addr;
-       u16 port;
+       __be32 addr;
+       __be16 port;
 
        LIST_HEAD(msgq);
 
@@ -612,7 +602,7 @@ int rxrpc_trans_immediate_abort(struct rxrpc_transport *trans,
        struct sockaddr_in sin;
        struct msghdr msghdr;
        struct kvec iov[2];
-       uint32_t _error;
+       __be32 _error;
        int len, ret;
 
        _enter("%p,%p,%d", trans, msg, error);
@@ -655,8 +645,8 @@ int rxrpc_trans_immediate_abort(struct rxrpc_transport *trans,
        _net("Sending message type %d of %d bytes to %08x:%d",
             ahdr.type,
             len,
-            htonl(sin.sin_addr.s_addr),
-            htons(sin.sin_port));
+            ntohl(sin.sin_addr.s_addr),
+            ntohs(sin.sin_port));
 
        /* send the message */
        ret = kernel_sendmsg(trans->socket, &msghdr, iov, 2, len);
@@ -678,7 +668,7 @@ static void rxrpc_trans_receive_error_report(struct rxrpc_transport *trans)
        struct list_head connq, *_p;
        struct errormsg emsg;
        struct msghdr msg;
-       uint16_t port;
+       __be16 port;
        int local, err;
 
        _enter("%p", trans);