[Asterisk-cvs] asterisk/apps app_voicemail.c,1.221,1.222

russell at lists.digium.com russell at lists.digium.com
Mon Jul 11 19:04:56 CDT 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv11927/apps

Modified Files:
	app_voicemail.c 
Log Message:
properly handle the return of the rowcount from ast_update_realtime (bug #4452)


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.221
retrieving revision 1.222
diff -u -d -r1.221 -r1.222
--- app_voicemail.c	10 Jul 2005 23:49:57 -0000	1.221
+++ app_voicemail.c	11 Jul 2005 23:13:11 -0000	1.222
@@ -408,8 +408,12 @@
 	int res;
 	if (!ast_strlen_zero(vmu->uniqueid)) {
 		res = ast_update_realtime("voicemail", "uniqueid", vmu->uniqueid, "password", password, NULL);
-		if (!res)
+		if (res > 0) {
 			ast_copy_string(vmu->password, password, sizeof(vmu->password));
+			res = 0;
+		} else if (!res) {
+			res = -1;
+		}
 		return res;
 	}
 	return -1;




More information about the svn-commits mailing list