Module: kamailio
Branch: master
Commit: 4e94572059d46b6bdd6726abfd52cb59793f5b03
URL: 
https://github.com/kamailio/kamailio/commit/4e94572059d46b6bdd6726abfd52cb59793f5b03

Author: Xenofon Karamanos <x...@gilawa.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-05-06T13:31:54+02:00

cdp: Cast time_t and use 'L' (long long) identifier in rpc function.

---

Modified: src/modules/cdp/cdp_rpc.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/4e94572059d46b6bdd6726abfd52cb59793f5b03.diff
Patch: 
https://github.com/kamailio/kamailio/commit/4e94572059d46b6bdd6726abfd52cb59793f5b03.patch

---

diff --git a/src/modules/cdp/cdp_rpc.c b/src/modules/cdp/cdp_rpc.c
index 576b1ba8fcc..8df60230c51 100644
--- a/src/modules/cdp/cdp_rpc.c
+++ b/src/modules/cdp/cdp_rpc.c
@@ -101,10 +101,10 @@ static void cdp_rpc_list_peers(rpc_t *rpc, void *ctx)
                        lock_release(i->lock);
                        return;
                }
-               if(rpc->struct_add(peerdetail_container, "ssd", "State",
+               if(rpc->struct_add(peerdetail_container, "ssL", "State",
                                   dp_states[(int)i->state], "Disabled",
                                   i->disabled ? "True" : "False", "Last used",
-                                  i->last_selected)
+                                  TIME_T_CAST(i->last_selected))
                                < 0) {
                        rpc->fault(ctx, 500,
                                        "Internal error creating peer detail 
container struct");

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to