~ubuntu-branches/ubuntu/saucy/dahdi-tools/saucy

« back to all changes in this revision

Viewing changes to debian/patches/astribank_allow_ignoreend

  • Committer: Bazaar Package Importer
  • Author(s): Jean-Michel Dault, Tzafrir Cohen
  • Date: 2010-02-16 13:44:09 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100216134409-4y4k26mgzyra537o
Tags: 1:2.2.1-0ubuntu1
* Merge from Debian pkg-voip.
  * Changes from Debian:
  - debian/control: Change Maintainer
  - debian/control: Removed Uploaders field.
  - debian/control: Removed Debian Vcs-Svn entry and replaced with
      ubuntu-voip Vcs-Bzr, to reflect divergence in packages.
  - debian/control: Package dahdi Depends on  dahdi-dkms | dahdi-source

* From Debian pkg-voip:
[ Tzafrir Cohen ]
* New upstream release (Closes: #536257, #564381).
* Patch 'bashism' dropped: merged upstream. 
* Patch xpp_no_extra_at dropped: merged upstream. 
* Add an example genconf_parameters.
* Compat level 7.
* Bump standars version to 3.8.3.0 (no change needed)
* Udev rules are now in dahdi-linux.
* Patches perl_fix_noserial, perl_fix_transportdir: Fixes for some
  minor perl issues.
* Add the missing ${misc:Depends}, as per lintian. 
* Patch astribank_allow_ignoreend: an extra missing patch from upstream. 
* Patches init_unload_modules and init_unload_oslec: also unload OSLEC
  when unloading all modules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
5
 
 
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.
 
8
 
 
9
---
 
10
 xpp/astribank_allow.c |   13 +++++++++----
 
11
 1 files changed, 9 insertions(+), 4 deletions(-)
 
12
 
 
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.
 
23
         */
 
24
        while (fgets(buf, 256, f) != NULL) {
 
25
                lineno++;
 
26
@@ -210,7 +210,12 @@ static int read_from_file(struct eeprom_table *eeprom_table, struct capabilities
 
27
                }
 
28
                line = trim(buf);
 
29
                if (line == NULL) {
 
30
-                       ERR("Line %d: Empty line\n", lineno);
 
31
+                       if (state > 0 && state < 4) {
 
32
+                               ERR("Line %d: Empty line\n", lineno);
 
33
+                               return -1;
 
34
+                       }
 
35
+                       else
 
36
+                               continue;
 
37
                }
 
38
                switch (state) {
 
39
                        case 0:
 
40
@@ -259,8 +264,8 @@ static int read_from_file(struct eeprom_table *eeprom_table, struct capabilities
 
41
                                }
 
42
                                break;
 
43
                        case 4:
 
44
-                               ERR("Extra data after license end block\n");
 
45
-                               return -1;
 
46
+                               break;
 
47
+
 
48
                }
 
49
        }
 
50
        if (state != 4) {
 
51
-- 
 
52
1.6.5
 
53