| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* nserver/tests/ncmd_tests.c (test_check_cmd): Test for check_cmd.
(all_tests): Add test_check_cmd.
|
|
|
|
| |
* nserver/tests/ncmd_tests.c (test_sanitize): Cleanup cmd.
|
|
|
|
|
| |
* nserver/tests/ncmd_tests.c (test_sanitize): Test for sanitize.
(all_tests): New function.
|
|
|
|
|
| |
* nserver/src/ncmd.c (sanitize): Replace the first '\n' with '\0'
instead of the last.
|
| |
|
|
|
|
|
|
|
|
| |
* nserver/src/nserve.c (sanitize, check_cmd): Move functions ...
* nserver/src/ncmd.c (sanitize, check_cmd): ... here.
* nserver/src/nserve.h (CMD_MIN_SIZE, CMD_MAX_SIZE): Move constants...
* nserver/src/ncmd.h (CMD_MIN_SIZE, CMD_MAX_SIZE): ... here.
(sanitize, check_cmd): New function declarations.
|
|
|
|
|
| |
* nserver/src/nserve.c (nserve): Loop until client sends an empty
command or a command with an invalid size.
|
|
|
|
|
|
|
| |
* nserver/src/nserve.c (check_cmd_size): Rename to ...
(check_cmd): ...this. Remove argument sock. Now returns a char *. The
returned char * is NULL on success and is pointer to err string on
failure.
|
|
|
|
| |
* nserver/src/nserve.c (check_cmd_size): Remove debug.
|
|
|
|
|
|
|
| |
* nserver/src/nserve.c (check_cmd_size): Update valid cmd size
constraint. If command size is zero; send close connection message.
* nserver/src/nserve.h (CMD_SIZE): Remove constant.
(CMD_MIN_SIZE, CMD_MAX_SIZE): New constants.
|
|
|
|
| |
* nserver/src/nserve.c (sanitize): New function.
|
|
|
|
|
| |
* nserver/src/nserve.c (check_cmd_size): Use barfsock to send error to
socket.
|
|
|
|
| |
* nserver/src/nserve.c (check_cmd_size): Add check for the send call.
|
|
|
|
| |
* nserver/src/nserve.c (nserve): buf -> cmd.
|
|
|
|
| |
* nserver/src/nserve.c (nserve): Add command size check.
|
|
|
|
| |
* nserver/src/nserve.c (nserve): Fix syntax error.
|
|
|
|
|
| |
* nserver/src/nserve.c (check_cmd_size): New function.
* nserver/src/nserve.h (CMD_SIZE): New constant.
|
|
|
|
|
| |
nserver/bin/statserve.c (main): Call nserve instead of echoserve on
fork.
|
|
|
|
|
|
|
|
| |
* nserver/src/necho.c: Remove file.
* nserver/src/nserve.c: New file.
* nserver/src/necho.h: Rename to...
* nserver/src/nserve.h: ...this. Remove functions `echo` and
`echoserve`. Add function `nserve`.
|
|
|
|
| |
* nserver/src/protocol.c (sslist): Destroy `ks` after use.
|
|
|
|
|
|
|
| |
* nserver/src/protocol.c (sslist): New function.
* nserver/src/protocol.h (sslist): New function declaration.
* nserver/tests/protocol_tests.c (test_sslist): Test fr sslist.
(all_tests): Add test_sslist.
|
|
|
|
| |
Add 'Hashmap_keys'. Taken from lcthw/hashmap.
|
|
|
|
| |
Add missing functions from lcthw/hashmap.
|
|
|
|
| |
* nserver/src/protocol.c (ssmean): Fix typo in comment.
|
|
|
|
|
|
| |
* nserver/src/protocol.c (ssdump): New function.
* nserver/tests/protocol_tests.c (test_ssdump): New test.
(all_tests): Add test_ssdump.
|
|
|
|
|
| |
* nserver/src/stats.c (Stats_dump): Update function.
* nserver/src/stats.h (Stats_dump): Return (char *).
|
|
|
|
|
|
| |
* nserver/src/protocol.c (ssdelete): New function.
* nserver/tests/protocol_tests.c (test_ssdelete): New test.
(all_tests): Add test_ssdelete.
|
|
|
|
|
|
| |
* nserver/src/protocol.c (ssmean): New function.
* nserver/tests/protocol_tests.c (test_ssmean): New test.
(all_tests): ADd test_ssmean.
|
|
|
|
|
|
| |
* nserver/src/protocol.c (sssample): New function.
* nserver/tests/protocol_tests.c (test_sssample): New test.
(all_tests): Add test_sssample.
|
|
|
|
| |
Change key names.
|
| |
|
|
|
|
|
| |
* nserver/src/protocol.c (sscreate): Flesh it out. Initial version.
* nserver/src/protocol.h: Include bstrlib, stats.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Add tests.
|
|
|
|
| |
Replace CFLAGS with LDLIBS.
|
|
|
|
|
| |
nserver/src/darray_algos.c (DArray_fucked_heapsort_swap): Make
function static.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* nserver/bin/statserve.c (echo, serve): Remove function.
(main): Use echoserve from necho.h for echoing back to client.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* nserver/src/nsocket.c (get_socket): Use SO_REUSEADDR to dodge
'address already in use' error. Put all socket related code in the
loop.
|