[dahdi-commits] tzafrir: branch tools/2.2 r7901 - in /tools/branches/2.2: ./ xpp/

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Tue Jan 12 13:05:43 CST 2010


Author: tzafrir
Date: Tue Jan 12 13:05:40 2010
New Revision: 7901

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7901
Log:
xpp: ignore everything after the end of the license stanza

Merged revisions 7333 via svnmerge from 
http://svn.digium.com/svn/dahdi/tools/trunk

Modified:
    tools/branches/2.2/   (props changed)
    tools/branches/2.2/xpp/astribank_allow.c

Propchange: tools/branches/2.2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jan 12 13:05:40 2010
@@ -1,1 +1,1 @@
-/tools/trunk:1-6678,6823,6829-6830,6832-6833,6835,6837-6886,6889-6982,6985-6998,7000-7011,7013-7042,7044,7046-7131,7133,7135-7136,7139-7217,7219-7255,7257-7332,7334-7460,7462-7476,7558,7596,7609,7752,7754,7792
+/tools/trunk:1-6678,6823,6829-6830,6832-6833,6835,6837-6886,6889-6982,6985-6998,7000-7011,7013-7042,7044,7046-7131,7133,7135-7136,7139-7217,7219-7255,7257-7460,7462-7476,7558,7596,7609,7752,7754,7792

Modified: tools/branches/2.2/xpp/astribank_allow.c
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.2/xpp/astribank_allow.c?view=diff&rev=7901&r1=7900&r2=7901
==============================================================================
--- tools/branches/2.2/xpp/astribank_allow.c (original)
+++ tools/branches/2.2/xpp/astribank_allow.c Tue Jan 12 13:05:40 2010
@@ -199,7 +199,7 @@
 	 * 1: read Version, goto 2. if not version line then error.
 	 * 2: after BEGIN line. split line into key:value. if line is Data:, goto 3.
 	 * 3: read binary data. if line is END_LICENSE_BLOCK goto 4.
-	 * 4: END_LICENSE_BLOCK - if not EOF - error. otherwise exit loop and success.
+	 * 4: END_LICENSE_BLOCK - ignore lines.
 	 */
 	while (fgets(buf, 256, f) != NULL) {
 		lineno++;
@@ -210,7 +210,12 @@
 		}
 		line = trim(buf);
 		if (line == NULL) {
-			ERR("Line %d: Empty line\n", lineno);
+ 			if (state > 0 && state < 4) {
+				ERR("Line %d: Empty line\n", lineno);
+				return -1;
+			}
+			else
+				continue;
 		}
 		switch (state) {
 			case 0:
@@ -259,8 +264,8 @@
 				}
 				break;
 			case 4:
-				ERR("Extra data after license end block\n");
-				return -1;
+				break;
+
 		}
 	}
 	if (state != 4) {




More information about the dahdi-commits mailing list