Re: [asterisk-users] MySQL() timeout
Douglas Garstang wrote: I guess... it shouldn't be too hard to find the time out value in the source and change it If you find the line, please let me know where. 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
Re: [asterisk-users] MySQL() timeout
On 10/31/07, Douglas Garstang wrote: I guess... it shouldn't be too hard to find the time out value in the source and change it I couldn't find any timeout related parameter in app_addon_sql_mysql.c You may find a default value in one of the header files. I am wondering if it wouldn't be easier to try and detect the existence of the DB host via System(). -baji. -- ___ --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
Re: [asterisk-users] MySQL() timeout
On Tuesday 30 October 2007 18:19:33 Douglas Garstang wrote: Anyone know if the MySQL() application has a configurable timeout? It does not. If it tries to connect to a bogus IP, it's timeout seems to be a few minutes. I'd like to cut it down to a few seconds. 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. -- Tilghman ___ --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
Re: [asterisk-users] MySQL() timeout
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
Re: [asterisk-users] MySQL() timeout
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 [EMAIL PROTECTED] 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 ___ --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
Re: [asterisk-users] MySQL() timeout
Sean Bright wrote: Find this line: if (mysql_real_connect(mysql, dbhost, dbuser... Excellent! Thank you both! 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
Re: [asterisk-users] MySQL() timeout
On 10/31/07, Doug Lytle wrote: Excellent! Thank you both! Doug don't forget that line of code will disappear the next time you upgrade your * addons, unless the change makes it into the official code base. -- ___ --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
[asterisk-users] MySQL() timeout
Anyone know if the MySQL() application has a configurable timeout? If it tries to connect to a bogus IP, it's timeout seems to be a few minutes. I'd like to cut it down to a few seconds. Doug. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ --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
Re: [asterisk-users] MySQL() timeout
Douglas Garstang wrote: Anyone know if the MySQL() application has a configurable timeout? If it tries to connect to a bogus IP, it's timeout seems to be a few minutes. I never got a response on that question myself. 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
Re: [asterisk-users] MySQL() timeout
I guess... it shouldn't be too hard to find the time out value in the source and change it - Original Message From: Doug Lytle [EMAIL PROTECTED] To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Sent: Tuesday, October 30, 2007 5:23:35 PM Subject: Re: [asterisk-users] MySQL() timeout Douglas Garstang wrote: Anyone know if the MySQL() application has a configurable timeout? If it tries to connect to a bogus IP, it's timeout seems to be a few minutes. I never got a response on that question myself. 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 __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ --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