summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 45c5e83)
raw | patch | inline | side by side (parent: 45c5e83)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 13 May 2014 21:33:52 +0000 (23:33 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Tue, 13 May 2014 21:33:52 +0000 (23:33 +0200) |
This is only meant for internal use; don't silently ignore it.
src/frontend/connection.c | patch | blob | history | |
t/unit/frontend/connection_test.c | patch | blob | history |
index a146e29711c3aa1cc4de78f59672d43ee52091e6..923f000743db5f3694698ffbecdb9a0a033ec4b4 100644 (file)
len = 2 * sizeof(uint32_t);
if (conn->cmd == CONNECTION_IDLE) {
+ const char *errmsg = "Invalid command 0";
+ sdb_strbuf_sprintf(conn->errbuf, errmsg);
+ sdb_connection_send(conn, CONNECTION_ERROR,
+ (uint32_t)strlen(errmsg), errmsg);
len += conn->cmd_len;
conn->cmd_len = 0;
}
index 125bb56fffb9eb2c3d8f6753fcf5e9fd4b50644f..da94f06ec3cfd1bf5b1391e7249b98dd6b9a0f20 100644 (file)
const char *err;
} golden_data[] = {
{ UINT32_MAX, NULL, NULL },
- { CONNECTION_IDLE, "fakedata", NULL },
+ { CONNECTION_IDLE, "fakedata", "Invalid command 0" },
{ CONNECTION_PING, NULL, "Authentication required" },
{ CONNECTION_STARTUP, "fakeuser", NULL },
{ CONNECTION_PING, NULL, NULL },
- { CONNECTION_IDLE, NULL, NULL },
+ { CONNECTION_IDLE, NULL, "Invalid command 0" },
{ CONNECTION_PING, "fakedata", NULL },
- { CONNECTION_IDLE, NULL, NULL },
+ { CONNECTION_IDLE, NULL, "Invalid command 0" },
};
size_t i;