1
From: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2
Date: Tue, 12 Jan 2010 19:05:40 +0000
3
Subject: xpp: ignore everything after the end of the license stanza
4
Origin: http://svn.digium.com/svn/dahdi/tools/branches/2.2@7901
6
Patch merged into branch 2.2 from trunk slightly too late to make it into
7
2.2.1 . Should be part of any future release.
10
xpp/astribank_allow.c | 13 +++++++++----
11
1 files changed, 9 insertions(+), 4 deletions(-)
13
diff --git a/xpp/astribank_allow.c b/xpp/astribank_allow.c
14
index ec60d4a..b68c3a2 100644
15
--- a/xpp/astribank_allow.c
16
+++ b/xpp/astribank_allow.c
17
@@ -199,7 +199,7 @@ static int read_from_file(struct eeprom_table *eeprom_table, struct capabilities
18
* 1: read Version, goto 2. if not version line then error.
19
* 2: after BEGIN line. split line into key:value. if line is Data:, goto 3.
20
* 3: read binary data. if line is END_LICENSE_BLOCK goto 4.
21
- * 4: END_LICENSE_BLOCK - if not EOF - error. otherwise exit loop and success.
22
+ * 4: END_LICENSE_BLOCK - ignore lines.
24
while (fgets(buf, 256, f) != NULL) {
26
@@ -210,7 +210,12 @@ static int read_from_file(struct eeprom_table *eeprom_table, struct capabilities
30
- ERR("Line %d: Empty line\n", lineno);
31
+ if (state > 0 && state < 4) {
32
+ ERR("Line %d: Empty line\n", lineno);
40
@@ -259,8 +264,8 @@ static int read_from_file(struct eeprom_table *eeprom_table, struct capabilities
44
- ERR("Extra data after license end block\n");