summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9ccac97)
raw | patch | inline | side by side (parent: 9ccac97)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 10 Apr 2014 15:50:53 +0000 (17:50 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 10 Apr 2014 15:50:53 +0000 (17:50 +0200) |
This is more flexible.
src/tools/sysdb/command.c | patch | blob | history | |
src/tools/sysdb/command.h | patch | blob | history | |
src/tools/sysdb/input.c | patch | blob | history |
index 1128c388e8bbd827f63e63cb2cd2628137e146fd..c79259e401c0786bb80336601208b058180e23e9 100644 (file)
*/
int
-sdb_command_print_reply(sdb_input_t *input)
+sdb_command_print_reply(sdb_client_t *client)
{
sdb_strbuf_t *recv_buf;
const char *result;
if (! recv_buf)
return -1;
- if (sdb_client_recv(input->client, &rcode, recv_buf) < 0)
+ if (sdb_client_recv(client, &rcode, recv_buf) < 0)
rcode = UINT32_MAX;
- if (sdb_client_eof(input->client))
+ if (sdb_client_eof(client))
return -1;
if (rcode == UINT32_MAX)
/* ignore errors; we'll only hide the command from the caller */
sdb_client_send(input->client, CONNECTION_QUERY, query_len, query);
- if (sdb_command_print_reply(input))
+ if (sdb_command_print_reply(input->client))
return NULL;
}
index 726e27a59f05f1229ecf79ac8874df625203b6a5..febf64f144a3c6f54ecee86d077531d14b414f76 100644 (file)
* - a negative value else
*/
int
-sdb_command_print_reply(sdb_input_t *input);
+sdb_command_print_reply(sdb_client_t *client);
/*
* sdb_command_exec:
index 3814f0c2def7a239d8397d9cad4558cbd52112ae..b515c4e10931db0c8e599d9820b991d974a6fb6b 100644 (file)
--- a/src/tools/sysdb/input.c
+++ b/src/tools/sysdb/input.c
/* some response / error message from the server pending */
/* XXX: clear current line */
printf("\n");
- sdb_command_print_reply(sysdb_input);
+ sdb_command_print_reply(sysdb_input->client);
rl_forced_update_display();
}