Module: kamailio
Branch: 5.0
Commit: 2ad024fb3e38823af8668d73d0a64be1f18697f3
URL:
https://github.com/kamailio/kamailio/commit/2ad024fb3e38823af8668d73d0a64be…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-12-04T09:42:37+01:00
core: pv - use active values for pv buffer slots and size
- during startup, param value and active can be different, up to the
moment when the config is completely loaded
(cherry picked from commit a156c625b434dc0bc19c43ece524f90b1179d881)
(cherry picked from commit 3929986622b502660b870916bcd7f015282a6a1c)
---
Modified: src/core/pvapi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2ad024fb3e38823af8668d73d0a64be…
Patch:
https://github.com/kamailio/kamailio/commit/2ad024fb3e38823af8668d73d0a64be…
---
diff --git a/src/core/pvapi.c b/src/core/pvapi.c
index 7e3d7b9b4b..97c23df539 100644
--- a/src/core/pvapi.c
+++ b/src/core/pvapi.c
@@ -2032,7 +2032,8 @@ char* pv_get_buffer(void)
char *p;
p = _pv_print_buffer[_pv_print_buffer_index];
- _pv_print_buffer_index = (_pv_print_buffer_index+1)%_pv_print_buffer_slots;
+ _pv_print_buffer_index = (_pv_print_buffer_index+1)
+ % _pv_print_buffer_slots_active;
return p;
}
@@ -2042,7 +2043,7 @@ char* pv_get_buffer(void)
*/
int pv_get_buffer_size(void)
{
- return _pv_print_buffer_size;
+ return _pv_print_buffer_size_active;
}
/**
@@ -2050,7 +2051,7 @@ int pv_get_buffer_size(void)
*/
int pv_get_buffer_slots(void)
{
- return _pv_print_buffer_slots;
+ return _pv_print_buffer_slots_active;
}
/**