[OpenSIPS-Devel] [OpenSIPS/opensips] 183072: statistics: alocating enough mem for stat name
Răzvan Crainea
razvan at opensips.org
Fri Jul 5 09:10:32 EDT 2019
Hi, Dan!
Apologies for the late reply, I do have a huge backlog on the devel list.
I totally agree with you, the naming of the flags should be more
meaningful, or at least better documented. I'll put this on my list of
TODO, thanks for pointing it out!
Best regards,
Răzvan
On 6/27/19 1:22 PM, Dan Pascu wrote:
> In actuality it was commit 1f7af0bdc that broke it not bc9423713, but I guess now it's too late to change the commit message.
>
> On a different note I find the way the register_stat2 function treats the flags to be confusing and counter intuitive. It allocates space for name if the STAT_SHM_NAME flag is not set and it allocates memory if STAT_NO_ALLOC is set. The only flag in there that seems to behave as expected is STAT_IS_FUNC. Maybe some better names for the flags would help. Like for example maybe STAT_NO_ALLOC is in fact STAT_NOT_ALLOCATED?
>
> On 27 Jun 2019, at 10:38, Răzvan Crainea wrote:
>
>> Branch: refs/heads/master
>> Home: https://github.com/OpenSIPS/opensips
>> Commit: 18307225468617272633524ab3985340e711067b
>> https://github.com/OpenSIPS/opensips/commit/18307225468617272633524ab3985340e711067b
>> Author: Razvan Crainea <razvan at opensips.org>
>> Date: 2019-06-27 (Thu, 27 Jun 2019)
>>
>> Changed paths:
>> M statistics.c
>>
>> Log Message:
>> -----------
>> statistics: alocating enough mem for stat name
>>
>> Commit bc9423713 broke statistics because it was no longer alocating
>> space for the name of the statistics. This commit fixes the issue.
>>
>> Thanks go to Maxim Sobolev for reporting this and pointing out the issue!
>>
>>
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
>
> --
> Dan
>
>
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
More information about the Devel
mailing list