[Kamailio-Devel] Setting mysql socket

Henning Westerholt henning.westerholt at 1und1.de
Tue Dec 30 13:31:02 CET 2008


On Mon, December 29, 2008 8:38 pm, Andreas Granig wrote:
> I've added the my.cnf group definition for mysql urls in a fully
> backward-compatible way like
> 	mysql://user:pass@[group]host:port/db or
> 	mysql://user:pass@[group]/db or
> 	mysql://[group]/db
> and any variants of it (it comes down to parsing the group part from the
> host part in my_con.c. There's also a small extension to db_id.c to also
> check usernames for NULL before comparing, otherwise it would segfault
> for the last example.
>
> Attached you can find the patches for trunk (it actually applies to 1.4
> also, except for the generated README because of some date/revision
> changes).
>
> If that's fine for you, please apply the patch. If there's more room for
> improvement, let me know.

Hi Andreas,

the patch looks good. I originally thought about implementing this in the
DB API core, but it makes probably more sense to do this in the db_mysql
module, as this is probably for now the only place where it used.

One minor thing, perhaps you can move the definition of the "char *grp" to
the beginning of the function, like the other char*. Feel free to apply
the patch if you like, as i don't have access to the svn at the moment
because of traveling. I can also apply it next week.

Henning





More information about the Devel mailing list