aboutsummaryrefslogtreecommitdiffstats
path: root/src/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/ArgParser.cxx12
-rw-r--r--src/protocol/ArgParser.hxx12
-rw-r--r--src/protocol/Result.cxx7
-rw-r--r--src/protocol/Result.hxx6
4 files changed, 18 insertions, 19 deletions
diff --git a/src/protocol/ArgParser.cxx b/src/protocol/ArgParser.cxx
index e96aaf1c8..b13ea3f4e 100644
--- a/src/protocol/ArgParser.cxx
+++ b/src/protocol/ArgParser.cxx
@@ -26,7 +26,7 @@
#include <stdlib.h>
bool
-check_uint32(Client *client, uint32_t *dst, const char *s)
+check_uint32(Client &client, uint32_t *dst, const char *s)
{
char *test;
@@ -40,7 +40,7 @@ check_uint32(Client *client, uint32_t *dst, const char *s)
}
bool
-check_int(Client *client, int *value_r, const char *s)
+check_int(Client &client, int *value_r, const char *s)
{
char *test;
long value;
@@ -64,7 +64,7 @@ check_int(Client *client, int *value_r, const char *s)
}
bool
-check_range(Client *client, unsigned *value_r1, unsigned *value_r2,
+check_range(Client &client, unsigned *value_r1, unsigned *value_r2,
const char *s)
{
char *test, *test2;
@@ -131,7 +131,7 @@ check_range(Client *client, unsigned *value_r1, unsigned *value_r2,
}
bool
-check_unsigned(Client *client, unsigned *value_r, const char *s)
+check_unsigned(Client &client, unsigned *value_r, const char *s)
{
unsigned long value;
char *endptr;
@@ -154,7 +154,7 @@ check_unsigned(Client *client, unsigned *value_r, const char *s)
}
bool
-check_bool(Client *client, bool *value_r, const char *s)
+check_bool(Client &client, bool *value_r, const char *s)
{
long value;
char *endptr;
@@ -171,7 +171,7 @@ check_bool(Client *client, bool *value_r, const char *s)
}
bool
-check_float(Client *client, float *value_r, const char *s)
+check_float(Client &client, float *value_r, const char *s)
{
float value;
char *endptr;
diff --git a/src/protocol/ArgParser.hxx b/src/protocol/ArgParser.hxx
index f69248d2d..ea28de79e 100644
--- a/src/protocol/ArgParser.hxx
+++ b/src/protocol/ArgParser.hxx
@@ -27,22 +27,22 @@
class Client;
bool
-check_uint32(Client *client, uint32_t *dst, const char *s);
+check_uint32(Client &client, uint32_t *dst, const char *s);
bool
-check_int(Client *client, int *value_r, const char *s);
+check_int(Client &client, int *value_r, const char *s);
bool
-check_range(Client *client, unsigned *value_r1, unsigned *value_r2,
+check_range(Client &client, unsigned *value_r1, unsigned *value_r2,
const char *s);
bool
-check_unsigned(Client *client, unsigned *value_r, const char *s);
+check_unsigned(Client &client, unsigned *value_r, const char *s);
bool
-check_bool(Client *client, bool *value_r, const char *s);
+check_bool(Client &client, bool *value_r, const char *s);
bool
-check_float(Client *client, float *value_r, const char *s);
+check_float(Client &client, float *value_r, const char *s);
#endif
diff --git a/src/protocol/Result.cxx b/src/protocol/Result.cxx
index e10a731cc..48feee4d4 100644
--- a/src/protocol/Result.cxx
+++ b/src/protocol/Result.cxx
@@ -27,16 +27,15 @@ const char *current_command;
int command_list_num;
void
-command_success(Client *client)
+command_success(Client &client)
{
client_puts(client, "OK\n");
}
void
-command_error_v(Client *client, enum ack error,
+command_error_v(Client &client, enum ack error,
const char *fmt, va_list args)
{
- assert(client != NULL);
assert(current_command != NULL);
client_printf(client, "ACK [%i@%i] {%s} ",
@@ -48,7 +47,7 @@ command_error_v(Client *client, enum ack error,
}
void
-command_error(Client *client, enum ack error, const char *fmt, ...)
+command_error(Client &client, enum ack error, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
diff --git a/src/protocol/Result.hxx b/src/protocol/Result.hxx
index 541b00327..0f7339c1c 100644
--- a/src/protocol/Result.hxx
+++ b/src/protocol/Result.hxx
@@ -32,14 +32,14 @@ extern const char *current_command;
extern int command_list_num;
void
-command_success(Client *client);
+command_success(Client &client);
void
-command_error_v(Client *client, enum ack error,
+command_error_v(Client &client, enum ack error,
const char *fmt, va_list args);
gcc_printf(3,4)
void
-command_error(Client *client, enum ack error, const char *fmt, ...);
+command_error(Client &client, enum ack error, const char *fmt, ...);
#endif