summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING2
-rw-r--r--configure.ac2
-rw-r--r--debian/control2
-rw-r--r--[-rwxr-xr-x]etc/install-mingw.sh4
-rw-r--r--examples/amqp_consumer.c2
-rw-r--r--examples/amqp_listen.c2
-rw-r--r--examples/amqp_listenq.c2
-rw-r--r--librabbitmq/amqp_socket.c2
-rw-r--r--librabbitmq/codegen.py2
-rw-r--r--tests/test_tables.expected18
-rw-r--r--tools/common.c28
-rw-r--r--tools/consume.c12
-rw-r--r--tools/doc/consume.xml4
-rw-r--r--tools/doc/declare_queue.xml2
-rw-r--r--tools/doc/delete_queue.xml2
-rw-r--r--tools/doc/get.xml2
-rw-r--r--tools/doc/publish.xml2
-rw-r--r--tools/get.c6
-rw-r--r--tools/publish.c10
-rw-r--r--tools/unix/process.c2
-rw-r--r--tools/windows/process.c16
21 files changed, 62 insertions, 62 deletions
diff --git a/COPYING b/COPYING
index 29e03b9..42b13c9 100644
--- a/COPYING
+++ b/COPYING
@@ -4,5 +4,5 @@ please see LICENSE-MPL-RabbitMQ. For the GPL, please see
LICENSE-GPL-2.0. Please see also the license block near the top of
each source file in the package.
-If you have any questions regarding licensing, please contact us at
+If you have any questions regarding licensing, please contact us at
info@rabbitmq.com.
diff --git a/configure.ac b/configure.ac
index 6736ced..2bf9433 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ fi
dnl Detect the kind of host we're building for
AC_CANONICAL_HOST
windows=no
-case "${host}" in
+case "${host}" in
*-*-mingw*)
windows=yes
;;
diff --git a/debian/control b/debian/control
index 6fc31af..fd69713 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Package: librabbitmq
Architecture: any
Section: libs
Priority: extra
-Depends:
+Depends:
Description: An AMQP client library written in C
Package: librabbitmq-dev
diff --git a/etc/install-mingw.sh b/etc/install-mingw.sh
index af70576..ba00538 100755..100644
--- a/etc/install-mingw.sh
+++ b/etc/install-mingw.sh
@@ -3,7 +3,7 @@
if [ $# -ne 1 ] ; then
echo "usage: install-mingw.sh <destination directory>" 1>&2
exit 1
-fi
+fi
unpack_dir=$1
@@ -67,7 +67,7 @@ for f in $download_dir/* ; do
*.tar.lzma)
tar -C $unpack_dir -xJf $f
;;
-
+
*)
echo "Don't know how to unpack $f" 1>&2
exit 1
diff --git a/examples/amqp_consumer.c b/examples/amqp_consumer.c
index 882bb8c..0a4d800 100644
--- a/examples/amqp_consumer.c
+++ b/examples/amqp_consumer.c
@@ -92,7 +92,7 @@ static void run(amqp_connection_state_t conn)
result = amqp_simple_wait_frame(conn, &frame);
if (result < 0)
return;
-
+
if (frame.frame_type != AMQP_FRAME_HEADER) {
fprintf(stderr, "Expected header!");
abort();
diff --git a/examples/amqp_listen.c b/examples/amqp_listen.c
index e6e4edd..c4e9a5a 100644
--- a/examples/amqp_listen.c
+++ b/examples/amqp_listen.c
@@ -152,7 +152,7 @@ int main(int argc, char const * const *argv) {
if (frame.frame_type != AMQP_FRAME_BODY) {
fprintf(stderr, "Expected body!");
abort();
- }
+ }
body_received += frame.payload.body_fragment.len;
assert(body_received <= body_target);
diff --git a/examples/amqp_listenq.c b/examples/amqp_listenq.c
index 0223d81..7a22338 100644
--- a/examples/amqp_listenq.c
+++ b/examples/amqp_listenq.c
@@ -133,7 +133,7 @@ int main(int argc, char const * const *argv) {
if (frame.frame_type != AMQP_FRAME_BODY) {
fprintf(stderr, "Expected body!");
abort();
- }
+ }
body_received += frame.payload.body_fragment.len;
assert(body_received <= body_target);
diff --git a/librabbitmq/amqp_socket.c b/librabbitmq/amqp_socket.c
index 953d52b..debed2a 100644
--- a/librabbitmq/amqp_socket.c
+++ b/librabbitmq/amqp_socket.c
@@ -305,7 +305,7 @@ amqp_rpc_reply_t amqp_simple_rpc(amqp_connection_state_t state,
||
((frame.channel == 0) &&
(frame.payload.method.id == AMQP_CONNECTION_CLOSE_METHOD)) ) ))
- {
+ {
amqp_frame_t *frame_copy = amqp_pool_alloc(&state->decoding_pool, sizeof(amqp_frame_t));
amqp_link_t *link = amqp_pool_alloc(&state->decoding_pool, sizeof(amqp_link_t));
diff --git a/librabbitmq/codegen.py b/librabbitmq/codegen.py
index 918b56a..905d313 100644
--- a/librabbitmq/codegen.py
+++ b/librabbitmq/codegen.py
@@ -539,7 +539,7 @@ int amqp_encode_properties(uint16_t class_id,
print " req.%s = %s;" % (n, val)
- reply = cConstantName(c_ize(m.klass.name) + '_' + c_ize(m.name)
+ reply = cConstantName(c_ize(m.klass.name) + '_' + c_ize(m.name)
+ "_ok_method")
print """
return amqp_simple_rpc_decoded(state, channel, %s, %s, &req);
diff --git a/tests/test_tables.expected b/tests/test_tables.expected
index 9c9dd6b..44d2085 100644
--- a/tests/test_tables.expected
+++ b/tests/test_tables.expected
@@ -1,5 +1,5 @@
AAAAAAAAAA
-F
+F
longstr ->
S Here is a long string
signedint ->
@@ -9,7 +9,7 @@ F
timestamp ->
T 109876543209876
table ->
- F
+ F
one ->
I 54321
two ->
@@ -25,9 +25,9 @@ F
binary ->
x 612062696e61727920737472696e67
void ->
- V
+ V
array ->
- A
+ A
I 54321
S A long string
float ->
@@ -35,7 +35,7 @@ F
double ->
d 3.14159
BBBBBBBBBB
-F
+F
longstr ->
S Here is a long string
signedint ->
@@ -45,7 +45,7 @@ F
timestamp ->
T 109876543209876
table ->
- F
+ F
one ->
I 54321
two ->
@@ -61,9 +61,9 @@ F
binary ->
x 612062696e61727920737472696e67
void ->
- V
+ V
array ->
- A
+ A
I 54321
S A long string
float ->
@@ -71,7 +71,7 @@ F
double ->
d 3.14159
----------
-F
+F
aardvark ->
S first
beta ->
diff --git a/tools/common.c b/tools/common.c
index cd38753..02c0655 100644
--- a/tools/common.c
+++ b/tools/common.c
@@ -133,7 +133,7 @@ char *amqp_rpc_reply_string(amqp_rpc_reply_t r)
switch (r.reply_type) {
case AMQP_RESPONSE_NORMAL:
return strdup("normal response");
-
+
case AMQP_RESPONSE_NONE:
return strdup("missing RPC reply type");
@@ -155,7 +155,7 @@ void die_rpc(amqp_rpc_reply_t r, const char *fmt, ...)
if (r.reply_type == AMQP_RESPONSE_NORMAL)
return;
-
+
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
@@ -188,7 +188,7 @@ amqp_connection_state_t make_connection(void)
amqp_connection_state_t conn;
char *host = amqp_server;
int port = 0;
-
+
/* parse the server string into a hostname and a port */
char *colon = strchr(amqp_server, ':');
if (colon) {
@@ -199,7 +199,7 @@ amqp_connection_state_t make_connection(void)
host[host_len] = 0;
port = strtol(colon+1, &port_end, 10);
- if (port < 0
+ if (port < 0
|| port > 65535
|| port_end == colon+1
|| *port_end != 0)
@@ -208,10 +208,10 @@ amqp_connection_state_t make_connection(void)
s = amqp_open_socket(host, port ? port : 5672);
die_amqp_error(s, "opening socket to %s", amqp_server);
-
+
conn = amqp_new_connection();
amqp_set_sockfd(conn, s);
-
+
die_rpc(amqp_login(conn, amqp_vhost, 0, 131072, 0,
AMQP_SASL_METHOD_PLAIN,
amqp_username, amqp_password),
@@ -219,7 +219,7 @@ amqp_connection_state_t make_connection(void)
if (!amqp_channel_open(conn, 1))
die_rpc(amqp_get_rpc_reply(conn), "opening channel");
-
+
return conn;
}
@@ -230,7 +230,7 @@ void close_connection(amqp_connection_state_t conn)
"closing channel");
die_rpc(amqp_connection_close(conn, AMQP_REPLY_SUCCESS),
"closing connection");
-
+
res = amqp_destroy_connection(conn);
die_amqp_error(res, "closing connection");
}
@@ -271,7 +271,7 @@ void write_all(int fd, amqp_bytes_t data)
ssize_t res = write(fd, data.bytes, data.len);
if (res < 0)
die_errno(errno, "write");
-
+
data.len -= res;
data.bytes += res;
}
@@ -281,13 +281,13 @@ void copy_body(amqp_connection_state_t conn, int fd)
{
size_t body_remaining;
amqp_frame_t frame;
-
+
int res = amqp_simple_wait_frame(conn, &frame);
die_amqp_error(res, "waiting for header frame");
if (frame.frame_type != AMQP_FRAME_HEADER)
die("expected header, got frame type 0x%X",
frame.frame_type);
-
+
body_remaining = frame.payload.properties.body_size;
while (body_remaining) {
res = amqp_simple_wait_frame(conn, &frame);
@@ -295,7 +295,7 @@ void copy_body(amqp_connection_state_t conn, int fd)
if (frame.frame_type != AMQP_FRAME_BODY)
die("expected body, got frame type 0x%X",
frame.frame_type);
-
+
write_all(fd, frame.payload.body_fragment);
body_remaining -= frame.payload.body_fragment.len;
}
@@ -330,13 +330,13 @@ void process_all_options(int argc, const char **argv,
poptContext opts = process_options(argc, argv, options,
"[OPTIONS]...");
const char *opt = poptPeekArg(opts);
-
+
if (opt) {
fprintf(stderr, "unexpected operand: %s\n", opt);
poptPrintUsage(opts, stderr, 0);
exit(1);
}
-
+
poptFreeContext(opts);
}
diff --git a/tools/consume.c b/tools/consume.c
index 7e50aa2..3a19d78 100644
--- a/tools/consume.c
+++ b/tools/consume.c
@@ -53,7 +53,7 @@ static char *stringify_bytes(amqp_bytes_t bytes)
uint8_t *data = bytes.bytes;
char *p = res;
size_t i;
-
+
for (i = 0; i < bytes.len; i++) {
if (data[i] >= 32 && data[i] != 127) {
*p++ = data[i];
@@ -61,7 +61,7 @@ static char *stringify_bytes(amqp_bytes_t bytes)
else {
*p++ = '\\';
*p++ = '0' + (data[i] >> 6);
- *p++ = '0' + (data[i] >> 3 & 0x7);
+ *p++ = '0' + (data[i] >> 3 & 0x7);
*p++ = '0' + (data[i] & 0x7);
}
}
@@ -112,7 +112,7 @@ static amqp_bytes_t setup_queue(amqp_connection_state_t conn,
"queue.bind");
}
}
-
+
return queue_bytes;
}
@@ -137,7 +137,7 @@ static void do_consume(amqp_connection_state_t conn, amqp_bytes_t queue,
amqp_basic_deliver_t *deliver
= (amqp_basic_deliver_t *)frame.payload.method.decoded;
delivery_tag = deliver->delivery_tag;
-
+
pipeline(argv, &pl);
copy_body(conn, pl.infd);
@@ -177,10 +177,10 @@ int main(int argc, const char **argv)
POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0 }
};
-
+
opts = process_options(argc, argv, options,
"[OPTIONS]... <command> <args>");
-
+
cmd_argv = poptGetArgs(opts);
if (!cmd_argv || !cmd_argv[0]) {
fprintf(stderr, "consuming command not specified\n");
diff --git a/tools/doc/consume.xml b/tools/doc/consume.xml
index c6dc65c..a912e19 100644
--- a/tools/doc/consume.xml
+++ b/tools/doc/consume.xml
@@ -38,7 +38,7 @@
</arg>
</cmdsynopsis>
</refsynopsisdiv>
-
+
<refsect1>
<title>Description</title>
<para>
@@ -73,7 +73,7 @@
The name of the queue to consume messages
from.
</para>
-
+
<para>
If the <option>--queue</option> option is
omitted, the AMQP server will assign a unique
diff --git a/tools/doc/declare_queue.xml b/tools/doc/declare_queue.xml
index 7e9da32..0fc0440 100644
--- a/tools/doc/declare_queue.xml
+++ b/tools/doc/declare_queue.xml
@@ -34,7 +34,7 @@
<arg choice="req">-q <replaceable>queue name</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
-
+
<refsect1>
<title>Description</title>
<para>
diff --git a/tools/doc/delete_queue.xml b/tools/doc/delete_queue.xml
index 69d03d8..040a384 100644
--- a/tools/doc/delete_queue.xml
+++ b/tools/doc/delete_queue.xml
@@ -33,7 +33,7 @@
<arg choice="req">-q <replaceable>queue name</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
-
+
<refsect1>
<title>Description</title>
<para>
diff --git a/tools/doc/get.xml b/tools/doc/get.xml
index 9770a8b..08abe2b 100644
--- a/tools/doc/get.xml
+++ b/tools/doc/get.xml
@@ -33,7 +33,7 @@
<arg choice="req">-q <replaceable>queue name</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
-
+
<refsect1>
<title>Description</title>
<para>
diff --git a/tools/doc/publish.xml b/tools/doc/publish.xml
index d2e8d2e..e609972 100644
--- a/tools/doc/publish.xml
+++ b/tools/doc/publish.xml
@@ -32,7 +32,7 @@
</arg>
</cmdsynopsis>
</refsynopsisdiv>
-
+
<refsect1>
<title>Description</title>
<para>
diff --git a/tools/get.c b/tools/get.c
index dd60366..fff1db5 100644
--- a/tools/get.c
+++ b/tools/get.c
@@ -47,7 +47,7 @@ static int do_get(amqp_connection_state_t conn, char *queue)
amqp_rpc_reply_t r
= amqp_basic_get(conn, 1, cstring_bytes(queue), 1);
die_rpc(r, "basic.get");
-
+
if (r.reply.id == AMQP_BASIC_GET_EMPTY_METHOD)
return 0;
@@ -68,14 +68,14 @@ int main(int argc, const char **argv)
POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0 }
};
-
+
process_all_options(argc, argv, options);
if (!queue) {
fprintf(stderr, "queue not specified\n");
return 1;
}
-
+
conn = make_connection();
got_something = do_get(conn, queue);
close_connection(conn);
diff --git a/tools/publish.c b/tools/publish.c
index a99b330..d4caff8 100644
--- a/tools/publish.c
+++ b/tools/publish.c
@@ -80,14 +80,14 @@ int main(int argc, const char **argv)
{"content-encoding", 'E', POPT_ARG_STRING,
&content_encoding, 0,
"the content-encoding for the message", "content encoding"},
- {"body", 'b', POPT_ARG_STRING, &body, 0,
- "specify the message body", "body"},
+ {"body", 'b', POPT_ARG_STRING, &body, 0,
+ "specify the message body", "body"},
POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0 }
};
process_all_options(argc, argv, options);
-
+
if (!exchange && !routing_key) {
fprintf(stderr,
"neither exchange nor routing key specified\n");
@@ -114,12 +114,12 @@ int main(int argc, const char **argv)
body_bytes = amqp_cstring_bytes(body);
else
body_bytes = read_all(0);
-
+
do_publish(conn, exchange, routing_key, &props, body_bytes);
if (!body)
free(body_bytes.bytes);
-
+
close_connection(conn);
return 0;
}
diff --git a/tools/unix/process.c b/tools/unix/process.c
index 835fc7d..1170ab1 100644
--- a/tools/unix/process.c
+++ b/tools/unix/process.c
@@ -69,7 +69,7 @@ void pipeline(const char *const *argv, struct pipeline *pl)
die_errno(posix_spawn_file_actions_destroy(&file_acts),
"posix_spawn_file_actions_destroy");
-
+
if (close(pipefds[0]))
die_errno(errno, "close");
diff --git a/tools/windows/process.c b/tools/windows/process.c
index 3bf7e58..0cd09fc 100644
--- a/tools/windows/process.c
+++ b/tools/windows/process.c
@@ -54,7 +54,7 @@ void die_windows_error(const char *fmt, ...)
if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM
| FORMAT_MESSAGE_ALLOCATE_BUFFER,
- NULL, GetLastError(),
+ NULL, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPSTR)&msg, 0, NULL))
msg = "(failed to retrieve Windows error message)";
@@ -146,10 +146,10 @@ void pipeline(const char *const *argv, struct pipeline *pl)
{
HANDLE in_read_handle, in_write_handle;
SECURITY_ATTRIBUTES sec_attr;
- PROCESS_INFORMATION proc_info;
+ PROCESS_INFORMATION proc_info;
STARTUPINFO start_info;
char *cmdline = make_command_line(argv);
-
+
sec_attr.nLength = sizeof sec_attr;
sec_attr.bInheritHandle = TRUE;
sec_attr.lpSecurityDescriptor = NULL;
@@ -159,11 +159,11 @@ void pipeline(const char *const *argv, struct pipeline *pl)
if (!SetHandleInformation(in_write_handle, HANDLE_FLAG_INHERIT, 0))
die_windows_error("SetHandleInformation");
-
+
/* when in Rome... */
ZeroMemory(&proc_info, sizeof proc_info);
ZeroMemory(&start_info, sizeof start_info);
-
+
start_info.cb = sizeof start_info;
start_info.dwFlags |= STARTF_USESTDHANDLES;
@@ -172,7 +172,7 @@ void pipeline(const char *const *argv, struct pipeline *pl)
|| (start_info.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE))
== INVALID_HANDLE_VALUE)
die_windows_error("GetStdHandle");
-
+
start_info.hStdInput = in_read_handle;
if (!CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0,
@@ -196,7 +196,7 @@ int finish_pipeline(struct pipeline *pl)
if (close(pl->infd))
die_errno(errno, "close");
-
+
for (;;) {
if (!GetExitCodeProcess(pl->proc_handle, &code))
die_windows_error("GetExitCodeProcess");
@@ -210,6 +210,6 @@ int finish_pipeline(struct pipeline *pl)
if (!CloseHandle(pl->proc_handle))
die_windows_error("CloseHandle for process");
-
+
return code;
}