[Serdev] lcr bug that can be fixed in: mysql/val.c
Java Rockx
javarockx at gmail.com
Tue Mar 22 03:07:25 UTC 2005
Chris,
This has already been fixed in the HEAD and rel_0_9_0 branches.
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/modules/mysql/val.c
Regards,
Paul
On Mon, 21 Mar 2005 20:03:54 -0500, Christopher Crawford
<crawford_c at pannaway.com> wrote:
> When using the lcr module, and routing to a gateway with the last IP tuple is greater than 127, it was found that the module was miscalculating the IP address when the value was retrieved from the database. We switched the atoi call in mysql/str2int/val.c to atoll and the problem was fixed. Below is the proposed fix:
>
> /*
> * Convert a string to 'integer'
> */
> static inline int str2int(const char* _s, int* _v)
> {
> if ((!_s) || (!_v)) {
> LOG(L_ERR, "str2int(): Invalid parameter value\n");
> return -1;
> }
>
> *_v = atoll(_s); <------------ fix here
>
> return 0;
> }
>
> Regards,
>
> Chris
>
> _______________________________________________
> Serdev mailing list
> serdev at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serdev
>
More information about the Serdev
mailing list