Module: kamailio
Branch: master
Commit: 09318b6d0f224cace31d7db925f792b66cefd469
URL: https://github.com/kamailio/kamailio/commit/09318b6d0f224cace31d7db925f792b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-12-27T09:24:33+01:00
seas: if expression on else not needed
- evaluation of it is true on else branch
---
Modified: src/modules/seas/event_dispatcher.c
---
Diff: https://github.com/kamailio/kamailio/commit/09318b6d0f224cace31d7db925f792b…
Patch: https://github.com/kamailio/kamailio/commit/09318b6d0f224cace31d7db925f792b…
---
diff --git a/src/modules/seas/event_dispatcher.c b/src/modules/seas/event_dispatcher.c
index 57483212686..e827629e53f 100644
--- a/src/modules/seas/event_dispatcher.c
+++ b/src/modules/seas/event_dispatcher.c
@@ -312,9 +312,7 @@ int dispatcher_main_loop(void)
poll_fds[3 + as_nr].revents = 0;
as_nr++; /*not very sure if this is thread-safe*/
unc_as_nr--;
- } else if(
- fd
- <= 0) { /* pull the upper set of incomplete AS down and take this one out*/
+ } else { /* pull the upper set of incomplete AS down and take this one out*/
poll_tmp->revents = 0;
for(k = i; k < (unc_as_nr - 1); k++) {
j = 3 + as_nr + k;
Kamailio project continued to evolve steadily, a new major release was
out during this year, next one planned in a few months, relying on an
amazing community of developers and users. We hope it kept helping
people and companies world wide to connect with the dear ones and build
a better way of living.
The season holidays are ahead, time to relax, spend time with family and
friends! I take again this chance to express my thanks and greetings to
all the friends, developers, supporting companies and community members
that made 2023 another fantastic year for Kamailio project.
Enjoy the holidays! Merry Christmas!
Daniel
* Santa is flying Kamailio! *
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services
Kamailio World Conference - April 18-19, 2024, Berlin
### Description
It would be nice if the JSONRPC-S module would support batch requests. For example if you want to set multiple values in htable simultaneously.
### Expected behavior
That the implementation is in line with JSON-RPC 2.0 specification and support batching.
For example:
`[
{"jsonrpc": "2.0", "method": "htable.stats", "id": 22},
{"jsonrpc": "2.0", "method": "htable.listTables", "id": 23}
]`
#### Actual observed behavior
Get an empty result with no error code (see Debugging data)
Only the first message is parsed when discarding the brackets (which should give a json format error anyway, but doesn't)
`
{"jsonrpc": "2.0", "method": "htable.stats", "id": 22},
{"jsonrpc": "2.0", "method": "htable.listTables", "id": 23}
`
Then I get an answer to only the first request instead of expected JSON validation error.
#### Debugging Data
`curl -X POST -H "Content-Type: application/json" -d '[{"jsonrpc": "2.0", "method": "htable.stats", "id": 22},{"jsonrpc": "2.0", "method": "htable.listTables", "id": 23}]' http://10.0.0.1:5060/RPC
{
"jsonrpc": "2.0",
"result": {
}
}`
#### Log Messages
`254(260) ERROR: jsonrpcs [jsonrpcs_mod.c:1263]: jsonrpc_dispatch(): missing or invalid jsonrpc field in request`
#### SIP Traffic
N/A
### Possible Solutions
Needs a code fix
### Additional Information
https://www.jsonrpc.org/specification
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3677
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3677(a)github.com>