Remove patch mg-mmap (applied upstream)
authorGilles Filippini <gilles.filippini@free.fr>
Mon, 16 Nov 2009 13:32:24 +0000 (14:32 +0100)
committerGilles Filippini <gilles.filippini@free.fr>
Mon, 16 Nov 2009 13:32:24 +0000 (14:32 +0100)
debian/patches/mg-mmap [deleted file]
debian/patches/series

diff --git a/debian/patches/mg-mmap b/debian/patches/mg-mmap
deleted file mode 100644 (file)
index 94751a1..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-Fix a significant memory link ending in segfault.
-
-The very first hunk is the actual fix. Others hunks add some error
-checking.
-diff --git a/navit/file.c b/navit/file.c
-index bee93b7..f02c017 100644
---- a/navit/file.c
-+++ b/navit/file.c
-@@ -145,7 +145,7 @@ int file_mkdir(char *name, int pflag)
- int
- file_mmap(struct file *file)
- {
--      int mmap_size=file->size+1024*1024;
-+      int mmap_size=file->size;
- #ifdef HAVE_API_WIN32_BASE
-       file->begin = (char*)mmap_readonly_win32( file->name, &file->map_handle, &file->map_file );
- #else
-diff --git a/navit/map/mg/street.c b/navit/map/mg/street.c
-index 8260dc5..b4493ec 100644
---- a/navit/map/mg/street.c
-+++ b/navit/map/mg/street.c
-@@ -774,7 +774,8 @@ street_get_byid(struct map_rect_priv *mr, struct street_priv *street, int id_hi,
-       dbg(1,"enter(%p,%p,0x%x,0x%x,%p)\n", mr, street, id_hi, id_lo, item);
-       if (! country)
-               return 0;
--        tree_search_hv(mr->m->dirname, "street", (id_lo >> 8) | (country << 24), id_lo & 0xff, &res);
-+        if (! tree_search_hv(mr->m->dirname, "street", (id_lo >> 8) | (country << 24), id_lo & 0xff, &res))
-+              return 0;
-       dbg(1,"res=0x%x (blk=0x%x)\n", res, res >> 12);
-         block_get_byindex(mr->m->file[mr->current_file], res >> 12, &mr->b);
-       street_get_data(street, &mr->b.p);
-diff --git a/navit/map/mg/tree.c b/navit/map/mg/tree.c
-index ef542bc..27459cf 100644
---- a/navit/map/mg/tree.c
-+++ b/navit/map/mg/tree.c
-@@ -145,17 +145,15 @@ tree_search_hv(char *dirname, char *filename, unsigned int search_h, unsigned in
-       dbg(1,"enter(%s, %s, 0x%x, 0x%x, %p)\n",dirname, filename, search_h, search_v, result);
-       sprintf(buffer, "%s/%s.h1", dirname, filename);
-       f_idx_h=file_create_caseinsensitive(buffer, 0);
--      if (! f_idx_h)
-+      if ((!f_idx_h) || (!file_mmap(f_idx_h)))
-               return 0;
--      file_mmap(f_idx_h);     
-       sprintf(buffer, "%s/%s.v1", dirname, filename);
-       f_idx_v=file_create_caseinsensitive(buffer, 0);
-       dbg(1,"%p %p\n", f_idx_h, f_idx_v);
--      if (! f_idx_v) {
-+      if ((!f_idx_v) || (!file_mmap(f_idx_v))) {
-               file_destroy(f_idx_h);
-               return 0;
-       }
--      file_mmap(f_idx_v);
-       if ((h=tree_search_h(f_idx_h, search_h))) {
-               dbg(1,"h=0x%x\n", h);
-               if ((v=tree_search_v(f_idx_v, h, search_v))) {
-diff --git a/navit/navigation.c b/navit/navigation.c
-index 03afd5a..0d68ff7 100644
---- a/navit/navigation.c
-+++ b/navit/navigation.c
-@@ -687,7 +687,8 @@ navigation_itm_new(struct navigation *this_, struct item *ritem)
-               ret->item=*sitem;
-               item_hash_insert(this_->hash, sitem, ret);
-               mr=map_rect_new(sitem->map, NULL);
--              sitem=map_rect_get_item_byid(mr, sitem->id_hi, sitem->id_lo);
-+              if (! (sitem=map_rect_get_item_byid(mr, sitem->id_hi, sitem->id_lo)))
-+                      return NULL;
-               if (item_attr_get(sitem, attr_street_name, &attr))
-                       ret->name1=map_convert_string(sitem->map,attr.u.str);
-               if (item_attr_get(sitem, attr_street_name_systematic, &attr))
index 0010ed4..de10fb9 100644 (file)
@@ -12,4 +12,3 @@ remove-libpng
 remove-espeak
 remove-support
 no-default-poi-geodownload
-mg-mmap