[OpenSIPS-Devel] [ opensips-Bugs-3178281 ] Srand in b2b_entities

Olivier Détour chino540off+kamailio at gmail.com
Fri Feb 11 14:55:39 CET 2011


Here is my patch.
Why: srand has to be initiate with a different value by process.
In the previous version, srand called get_uticks with concurrency
access, and rand value will be the same.

On Fri, Feb 11, 2011 at 2:21 PM, SourceForge.net
<noreply at sourceforge.net> wrote:
> Bugs item #3178281, was opened at 2011-02-11 13:21
> Message generated for change (Tracker Item Submitted) made by nobody
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3178281&group_id=232389
>
> Please note that this message will contain a full copy of the comment thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: modules
> Group: 1.6.x
> Status: Open
> Resolution: None
> Priority: 5
> Private: No
> Submitted By: Nobody/Anonymous (nobody)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: Srand in b2b_entities
>
> Initial Comment:
> Hi,
> The use of srand is wrong in generation of random value in the second part of callid.
> srand have to be called one time for init, after call rand to get a random value.
>
> Regards,
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3178281&group_id=232389
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>



-- 
Olivier Détour
-------------- next part --------------
A non-text attachment was scrubbed...
Name: srand.patch
Type: application/octet-stream
Size: 857 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/devel/attachments/20110211/4751d9be/attachment.obj>


More information about the Devel mailing list