- bring in a patch from Debian to fix a SIGABRT on startup
issue noticed by todd@
This commit is contained in:
parent
2f18fe683a
commit
604917d4c4
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.7 2008/11/08 13:15:43 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.8 2008/11/08 17:13:08 ajacoutot Exp $
|
||||
|
||||
COMMENT= 3D earth viewer with GPS support
|
||||
|
||||
DISTNAME= gaia-0.1.2
|
||||
PKGNAME= ${DISTNAME}p4
|
||||
PKGNAME= ${DISTNAME}p5
|
||||
CATEGORIES= x11 geo
|
||||
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
31
x11/gaia/patches/patch-lib_wwfetch_wwfetch_image_c
Normal file
31
x11/gaia/patches/patch-lib_wwfetch_wwfetch_image_c
Normal file
@ -0,0 +1,31 @@
|
||||
$OpenBSD: patch-lib_wwfetch_wwfetch_image_c,v 1.1 2008/11/08 17:13:08 ajacoutot Exp $
|
||||
--- lib/wwfetch/wwfetch_image.c.orig Wed Nov 29 04:21:14 2006
|
||||
+++ lib/wwfetch/wwfetch_image.c Sat Nov 8 18:01:51 2008
|
||||
@@ -27,6 +27,9 @@
|
||||
* @param level level of image [0..]
|
||||
*/
|
||||
wwfetch_error wwfetch_fetch_image(wwfetch *handle, int x, int y, int level) {
|
||||
+ if (level > 14)
|
||||
+ return WWFETCH_NOT_FOUND;
|
||||
+
|
||||
int res = 1 << (level);
|
||||
|
||||
double x1 = (double)(x)/(double)(res) * 360.0 - 180.0;
|
||||
@@ -36,8 +39,16 @@ wwfetch_error wwfetch_fetch_image(wwfetch *handle, int
|
||||
|
||||
/* form full url */
|
||||
char urlbuf[1024];
|
||||
- if (snprintf(urlbuf, sizeof(urlbuf), "http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic_base&srs=EPSG:4326&width=256&height=256&bbox=%f,%f,%f,%f&format=image/jpeg&version=1.1.0&styles=", x1, y1, x2, y2) >= sizeof(urlbuf))
|
||||
+ if (snprintf(urlbuf, sizeof(urlbuf), "http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&srs=EPSG:4326&width=512&height=512&bbox=%f,%f,%f,%f&format=image/jpeg&version=1.1.0&styles=", x1, y1, x2, y2) >= sizeof(urlbuf))
|
||||
return WWFETCH_SMALL_BUFFER;
|
||||
+
|
||||
+ wwfetch_error result = wwfetch_fetch(handle, urlbuf);
|
||||
+ if (result == WWFETCH_OK) {
|
||||
+ if (handle->currentsize < 4 || handle->currentdata[0] != 0xff ||
|
||||
+ handle->currentdata[1] != 0xd8 || handle->currentdata[2] != 0xff ||
|
||||
+ handle->currentdata[3] != 0xe0)
|
||||
+ return WWFETCH_FETCH_FAILED;
|
||||
+ }
|
||||
|
||||
return wwfetch_fetch(handle, urlbuf);
|
||||
}
|
Loading…
Reference in New Issue
Block a user