Module: kamailio Branch: 5.1 Commit: 3929986622b502660b870916bcd7f015282a6a1c URL: https://github.com/kamailio/kamailio/commit/3929986622b502660b870916bcd7f015...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2017-12-04T09:27:09+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)
---
Modified: src/core/pvapi.c
---
Diff: https://github.com/kamailio/kamailio/commit/3929986622b502660b870916bcd7f015... Patch: https://github.com/kamailio/kamailio/commit/3929986622b502660b870916bcd7f015...
---
diff --git a/src/core/pvapi.c b/src/core/pvapi.c index 0e4d4d326f..64b9fd96ff 100644 --- a/src/core/pvapi.c +++ b/src/core/pvapi.c @@ -2105,7 +2105,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; } @@ -2115,7 +2116,7 @@ char* pv_get_buffer(void) */ int pv_get_buffer_size(void) { - return _pv_print_buffer_size; + return _pv_print_buffer_size_active; }
/** @@ -2123,7 +2124,7 @@ int pv_get_buffer_size(void) */ int pv_get_buffer_slots(void) { - return _pv_print_buffer_slots; + return _pv_print_buffer_slots_active; }
/**