[asterisk-commits] mmichelson: branch group/upenn r101016 - in /team/group/upenn: apps/ doc/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 29 15:55:06 CST 2008
Author: mmichelson
Date: Tue Jan 29 15:55:06 2008
New Revision: 101016
URL: http://svn.digium.com/view/asterisk?view=rev&rev=101016
Log:
Backporting the fix for issue 11665 from trunk to the upenn branch.
This fix adds the options for setting TCP timeouts for IMAP transactions
so that network problems won't cause IMAP operations to block forever.
Modified:
team/group/upenn/apps/app_voicemail.c
team/group/upenn/doc/imapstorage.txt
Modified: team/group/upenn/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/group/upenn/apps/app_voicemail.c?view=diff&rev=101016&r1=101015&r2=101016
==============================================================================
--- team/group/upenn/apps/app_voicemail.c (original)
+++ team/group/upenn/apps/app_voicemail.c Tue Jan 29 15:55:06 2008
@@ -7484,6 +7484,7 @@
const char *extpc;
const char *emaildateformatstr;
const char *volgainstr;
+ const char *val;
char *q, *stringp;
int x;
int tmpadsi[4];
@@ -7657,6 +7658,31 @@
} else {
ast_copy_string(imapfolder,"INBOX", sizeof(imapfolder));
}
+ /* Handle the timeouts */
+ if ((val = ast_variable_retrieve(cfg, "general", "imapreadtimeout"))) {
+ mail_parameters(NIL, SET_READTIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_READTIMEOUT, (void *) 60L);
+ }
+
+ if ((val = ast_variable_retrieve(cfg, "general", "imapwritetimeout"))) {
+ mail_parameters(NIL, SET_WRITETIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_WRITETIMEOUT, (void *) 60L);
+ }
+
+ if ((val = ast_variable_retrieve(cfg, "general", "imapopentimeout"))) {
+ mail_parameters(NIL, SET_OPENTIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_OPENTIMEOUT, (void *) 60L);
+ }
+
+ if ((val = ast_variable_retrieve(cfg, "general", "imapclosetimeout"))) {
+ mail_parameters(NIL, SET_CLOSETIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_CLOSETIMEOUT, (void *) 60L);
+ }
+
#endif
/* External voicemail notify application */
Modified: team/group/upenn/doc/imapstorage.txt
URL: http://svn.digium.com/view/asterisk/team/group/upenn/doc/imapstorage.txt?view=diff&rev=101016&r1=101015&r2=101016
==============================================================================
--- team/group/upenn/doc/imapstorage.txt (original)
+++ team/group/upenn/doc/imapstorage.txt Tue Jan 29 15:55:06 2008
@@ -94,6 +94,10 @@
expungeonhangup=<yes or no>
authuser=<username>
authpassword=<password>
+imapreadtimeout=<value in seconds>
+imapwritetimeout=<value in seconds>
+imapopentimeout=<value in seconds>
+imapclosetimeout=<value in seconds>
The "expungeonhangup" flag is used to determine if the voicemail system should
expunge all messages marked for deletion when the user hangs up the phone.
More information about the asterisk-commits
mailing list