diff options
Diffstat (limited to 'client/acronc/client.c')
-rw-r--r-- | client/acronc/client.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/client/acronc/client.c b/client/acronc/client.c index 5553d4c..3e8ca76 100644 --- a/client/acronc/client.c +++ b/client/acronc/client.c @@ -71,8 +71,10 @@ static void handle_response(const ac_response_t *response) { switch (response->type) { case AC_RESPONSE_OK: { ac_response_ok_t *o = (ac_response_ok_t *) response; +#ifdef DEBUG printf("Request %d OK.\n", o->id); +#endif break; } case AC_RESPONSE_ERROR: { @@ -85,18 +87,25 @@ static void handle_response(const ac_response_t *response) { } case AC_RESPONSE_CMD_OUT: { ac_response_cmd_out_t *o = (ac_response_cmd_out_t *) response; +#ifdef DEBUG printf("Request %d output by %s: %s.\n", o->id, o->sender, o->out); +#else + printf("%s\n", + o->out); +#endif break; } case AC_RESPONSE_CMD_RESULT: { ac_response_cmd_result_t *o = (ac_response_cmd_result_t *) response; +#ifdef DEBUG printf("Request %d is done: %s (%d).\n", o->id, o->success ? "Success" : "Failed", o->result); +#endif DEBUG break; } default: { |