[Home]

Summary:ASTERISK-07434: [patch] app_voicemail triggers error messages when trying to lock non-existing path
Reporter:Kai Militzer (kmilitzer)Labels:
Date Opened:2006-08-01 01:53:32Date Closed:2006-09-27 15:27:45
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) voicemail_lockin_problem.patch
( 1) voicemail_locking_check_new.patch
( 2) voicemail_locking_check.patch
Description:As a result of the latest fixes in ast_lock_path in app.c, app_voicemail.c triggers an error message if it tries to lock a non-existing path. This is not a servere problem but SPAMs the logfile with non-fatal errors. I wrote a small patch that checks if a path exists before trying to lock it in app_voicmail.c, so that ast_lock_path will not be called if the path does not exist.
Comments:By: Tilghman Lesher (tilghman) 2006-08-01 08:20:33

The correct action would be to ensure that the path exists (i.e. mkdir), because when locking a path, you're going to be putting something in that directory.

Otherwise, locking fails catastrophically.



By: Kai Militzer (kmilitzer) 2006-08-08 06:32:33

But I am not locking the path, when it does not exists. The main problem _was_ trying to lock a non-existing directory without creating it first. So I now check, if the path exists befor locking it.

By: Tilghman Lesher (tilghman) 2006-08-08 09:55:25

But the problem is that you're returning a value that indicates that the locking succeeded, when, in fact, you didn't even TRY to lock the directory.

By: Kai Militzer (kmilitzer) 2006-08-09 06:15:41

OK, now an error (negativ value) is returned, if the directory does not exists. To make this work, I had to delete a stupid check for the Old folder before the INBOX folder, that made voicemailmain exit, if Old does not exist. Now it works somehow as it should, but the whole locking and file/message handling of voicemail is pretty ugly nevertheless.

By: Kai Militzer (kmilitzer) 2006-08-11 08:46:43

I looked into the thing again, and found a much more elegant and easier way to solve the problem of locking of non existing mailboxes. In open_mailbox I now simply create it if it does not already exists before opening it. So locking will never fail. This solutions looks better to me.

By: Kai Militzer (kmilitzer) 2006-08-23 01:31:20

Do you need any more information/feedback or is there hope that this fix will be put into the next release (1.2.12) as it didn't make it into 1.2.11?

By: Tilghman Lesher (tilghman) 2006-09-27 15:27:45

Committed in 43815, 43816, 43817.