[asterisk-users] MySQL() timeout
Sean Bright
sean.bright at gmail.com
Wed Oct 31 10:12:13 CDT 2007
Find this line:
if (mysql_real_connect(mysql, dbhost, dbuser...
Add this before that line:
int timeout = 10; /* 10 second timeout */
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (const char *) &timeout);
And recompile.
On 10/31/07, Doug Lytle <support at drdos.info> wrote:
>
> Tilghman Lesher wrote:
> > The key would be adding this line at the appropriate point:
> > mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, &timeout)
> > where timeout is an integer. Remember that it needs to be set
> > BEFORE the connection.
> >
> >
>
> Anybody like to give more detailed instructions for those of use not
> instructed in C?
>
> Thanks!
>
> Doug
>
>
> --
>
> Ben Franklin quote:
>
> "Those who would give up Essential Liberty to purchase a little Temporary
> Safety, deserve neither Liberty nor Safety."
>
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071031/9acbe5a0/attachment.htm
More information about the asterisk-users
mailing list