Module: kamailio
Branch: master
Commit: c3ce318e01bf0eae70daa109e680a75f3ea71546
URL:
https://github.com/kamailio/kamailio/commit/c3ce318e01bf0eae70daa109e680a75…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-06-13T11:51:46+02:00
dispatcher: print oc details in the record group not in attrs
---
Modified: src/modules/dispatcher/dispatcher.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c3ce318e01bf0eae70daa109e680a75…
Patch:
https://github.com/kamailio/kamailio/commit/c3ce318e01bf0eae70daa109e680a75…
---
diff --git a/src/modules/dispatcher/dispatcher.c b/src/modules/dispatcher/dispatcher.c
index 1e6beef600d..3fd941c21c4 100644
--- a/src/modules/dispatcher/dispatcher.c
+++ b/src/modules/dispatcher/dispatcher.c
@@ -1869,12 +1869,16 @@ int ds_rpc_print_set(
ipbuf[0] = '\0';
ip_addr2sbufz(
&node->dlist[j].ip_address, ipbuf, IP_ADDR_MAX_STRZ_SIZE);
- if(rpc->struct_add(vh, "Ssddjj", "HOST",
&node->dlist[j].host,
+ if(rpc->struct_add(vh, "Ssddjjujj", "HOST",
&node->dlist[j].host,
"IPADDR", ipbuf, "PORT", (int)node->dlist[j].port,
"PROTOID", (int)node->dlist[j].proto, "DNSTIME_SEC",
(unsigned long)node->dlist[j].dnstime.tv_sec,
"DNSTIME_USEC",
- (unsigned long)node->dlist[j].dnstime.tv_usec)
+ (unsigned long)node->dlist[j].dnstime.tv_usec, "OCRATE",
+ node->dlist[j].attrs.ocrate, "OCTIME_SEC",
+ (unsigned long)node->dlist[j].octime.tv_sec,
+ "OCTIME_USEC",
+ (unsigned long)node->dlist[j].octime.tv_usec)
< 0) {
rpc->fault(ctx, 500, "Internal error creating dest struct");
return -1;
@@ -1886,7 +1890,7 @@ int ds_rpc_print_set(
rpc->fault(ctx, 500, "Internal error creating dest struct");
return -1;
}
- if(rpc->struct_add(wh, "SSdddSSSujj", "BODY",
+ if(rpc->struct_add(wh, "SSdddSSS", "BODY",
&(node->dlist[j].attrs.body), "DUID",
(node->dlist[j].attrs.duid.s)
? &(node->dlist[j].attrs.duid)
@@ -1904,11 +1908,7 @@ int ds_rpc_print_set(
"OBPROXY",
(node->dlist[j].attrs.obproxy.s)
? &(node->dlist[j].attrs.obproxy)
- : &data,
- "OCRATE", node->dlist[j].attrs.ocrate, "OCTIME_SEC",
- (unsigned long)node->dlist[j].octime.tv_sec,
- "OCTIME_USEC",
- (unsigned long)node->dlist[j].octime.tv_usec)
+ : &data)
< 0) {
rpc->fault(ctx, 500, "Internal error creating attrs struct");
return -1;