This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository e16.
View the commit online.
commit 33d89e9b07d16f1a23db39e1e598276054cc040b
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sat Dec 23 09:20:44 2023 +0100
ipc: Ignore whitespace only command lines
Avoiding error dialog.
---
src/ipc.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/ipc.c b/src/ipc.c
index e2be5dc8..04745c42 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -1882,15 +1882,19 @@ IpcExec(const char *params)
if (EDebug(EDBUG_TYPE_IPC))
Eprintf("%s: '%s'\n", __func__, params);
- cmd[0] = 0;
+ cmd[0] = '\0';
num = 0;
if (params)
sscanf(params, "%100s %n", cmd, &num);
prm = (num > 0 && params[num]) ? params + num : NULL;
+ ok = 1;
+
+ if (cmd[0] == '\0')
+ goto done; /* Accept empty input */
+
lst = IPC_GetList(&num);
- ok = 0;
for (i = 0; i < num; i++)
{
ipc = lst[i];
@@ -1899,16 +1903,16 @@ IpcExec(const char *params)
ipc->func(prm);
- ok = 1;
- break;
+ goto done;
}
- if (!ok && params)
- ok = IPC_Compat(params);
+ /* Commmand not found - check the legacy ones */
+ ok = IPC_Compat(params);
if (!ok)
IpcPrintf("Unknown command: '%s'\n", params);
+ done:
return ok;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.