From dde1a342d0d4e70eb9fa1f44bb1743b0a84bfbb3 Mon Sep 17 00:00:00 2001 From: Antonio Aloisio Date: Tue, 16 Nov 2021 07:54:43 +0100 Subject: [PATCH] httpd: added debugging for shget failing in get_cfg_clientlist --- release/src/router/httpd/web.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release/src/router/httpd/web.c b/release/src/router/httpd/web.c index ac3dc6e55f0..cf9eb9ea02c 100644 --- a/release/src/router/httpd/web.c +++ b/release/src/router/httpd/web.c @@ -27875,7 +27875,8 @@ ej_get_cfg_clientlist(int eid, webs_t wp, int argc, char **argv){ lock = file_lock(CFG_FILE_LOCK); shm_client_tbl_id = shmget((key_t)KEY_SHM_CFG, sizeof(CM_CLIENT_TABLE), 0666|IPC_CREAT); if (shm_client_tbl_id == -1){ - fprintf(stderr, "shmget failed\n"); + int error = errno; + fprintf(stderr, "shmget failed (%d)\n", error); file_unlock(lock); return 0; }