[Asterisk-Dev] possible bug in app_voicemail.c / CVS head

Christopher L. Wade clwade at sparco.com
Fri Nov 5 13:58:32 MST 2004


I'm running the bleeding edge of CVS right now, testing of course, and 
noticed voicemail isn't working.  I'm not using the realtime stuff, yet, 
so app_voicemail.c::find_user is finding my users, but vm_authenticate 
is not quite processing it right.

Problem:
	Uesr cannot check voicemail because user cannot login.

Possibe Cause:
	user dials extension that executes 'VoicemailMain(1234)'
	vm_execmain handles voicemailmain
		runs find_user
			user '1234' is found
		increments skipuser
		runs vm_authenticate
			skipuser > 1, vmu left as NULL
			!strcmp(passptr, password) = false
... i don't need to continue, do i?

Possible Solution:
	vm_authenticate
		skiuser > 1, vmu = res_vmu

Here's my fix... YMMV/IWFM :)

Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.168
diff -u -r1.168 app_voicemail.c
--- app_voicemail.c     4 Nov 2004 03:41:26 -0000       1.168
+++ app_voicemail.c     5 Nov 2004 20:27:45 -0000
@@ -3296,6 +3296,8 @@
                         adsi_password(chan);
                 if (!skipuser)
                         vmu = find_user(&vmus, context, mailbox);
+               else
+                       vmu = res_vmu ;
                 if (vmu && (vmu->password[0] == '\0' || 
(vmu->password[0] == '-' && vmu->password[1] == '\0'))) {
                         /* saved password is blank, so don't bother 
asking */
                         password[0] = '\0';





Thanks,
Chris


-- 
Christopher L. Wade                     Unistar-Sparco Computers, Inc.
Senior Systems Administrator                            dba Sparco.com
Email: clwade at sparco.com                             7089 Ryburn Drive
Phone: (901) 872 2272 / (800) 840 8400            Millington, TN 38053
Fax:   (901) 872 8482                                              USA




More information about the asterisk-dev mailing list