mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-15 22:05:24 -05:00
server: add debug logging of client argc/argv
This commit is contained in:
parent
25311fc4eb
commit
19c099236b
1 changed files with 4 additions and 0 deletions
4
server.c
4
server.c
|
|
@ -113,6 +113,8 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
|
|||
if (recv(fd, &client->argc, sizeof(client->argc), 0) != sizeof(client->argc))
|
||||
goto shutdown;
|
||||
|
||||
LOG_DBG("argc = %d", client->argc);
|
||||
|
||||
client->argv = calloc(client->argc + 1, sizeof(client->argv[0]));
|
||||
for (int i = 0; i < client->argc; i++) {
|
||||
uint16_t len;
|
||||
|
|
@ -123,6 +125,8 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
|
|||
client->argv[i][len] = '\0';
|
||||
if (recv(fd, client->argv[i], len, 0) != len)
|
||||
goto shutdown;
|
||||
|
||||
LOG_DBG("argv[%d] = %s (%hu)", i, client->argv[i], len);
|
||||
}
|
||||
|
||||
assert(client->term == NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue