[asterisk-commits] qwell: trunk r101823 - in /trunk: ./ apps/app_authenticate.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 1 11:44:33 CST 2008


Author: qwell
Date: Fri Feb  1 11:44:32 2008
New Revision: 101823

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101823
Log:
Move an feof() call to before the fgets().
This would have exited the loop early if you had an authentication file with no newline at the end.

Modified:
    trunk/   (props changed)
    trunk/apps/app_authenticate.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_authenticate.c?view=diff&rev=101823&r1=101822&r2=101823
==============================================================================
--- trunk/apps/app_authenticate.c (original)
+++ trunk/apps/app_authenticate.c Fri Feb  1 11:44:32 2008
@@ -150,10 +150,10 @@
 			for (;;) {
 				size_t len;
 
-				fgets(buf, sizeof(buf), f);
-
 				if (feof(f))
 					break;
+
+				fgets(buf, sizeof(buf), f);
 
 				if (ast_strlen_zero(buf))
 					continue;




More information about the asterisk-commits mailing list