diff options
author | David Wragg <david@rabbitmq.com> | 2010-07-26 02:54:33 +0100 |
---|---|---|
committer | David Wragg <david@rabbitmq.com> | 2010-07-26 02:54:33 +0100 |
commit | 6cc7fe86a01628483646a0b1eca423a9d8a34025 (patch) | |
tree | d5f676ea65e5835857a68f021b647d2c4ba78b17 /librabbitmq/amqp_socket.c | |
parent | e16672cf9ded0b329090b8612a2b1d3f9831288c (diff) | |
download | rabbitmq-c-github-ask-6cc7fe86a01628483646a0b1eca423a9d8a34025.tar.gz |
Convert the socket_ prefix to amqp_socket_
Diffstat (limited to 'librabbitmq/amqp_socket.c')
-rw-r--r-- | librabbitmq/amqp_socket.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/librabbitmq/amqp_socket.c b/librabbitmq/amqp_socket.c index fc823be..d39f29d 100644 --- a/librabbitmq/amqp_socket.c +++ b/librabbitmq/amqp_socket.c @@ -70,7 +70,7 @@ int amqp_open_socket(char const *hostname, struct hostent *he; int one = 1; /* used as a buffer by setsockopt below */ - res = socket_init(); + res = amqp_socket_init(); if (res) return res; @@ -84,13 +84,14 @@ int amqp_open_socket(char const *hostname, sockfd = socket(PF_INET, SOCK_STREAM, 0); if (sockfd == -1) - return -encoded_socket_errno(); + return -amqp_socket_error(); - if (socket_setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one)) < 0 + if (amqp_socket_setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &one, + sizeof(one)) < 0 || connect(sockfd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { - res = -encoded_socket_errno(); - socket_close(sockfd); + res = -amqp_socket_error(); + amqp_socket_close(sockfd); return res; } @@ -200,7 +201,7 @@ static int wait_frame_inner(amqp_connection_state_t state, if (result == 0) return -ERROR_CONNECTION_CLOSED; else - return -encoded_socket_errno(); + return -amqp_socket_error(); } state->sock_inbound_limit = result; |