changeset 2031:e3d9ef56fec8

back out my change
author William Pitcock <nenolod@atheme.org>
date Fri, 12 Oct 2007 15:06:59 -0500
parents 32124206d46b
children 55f2fd232291
files src/neon/neon.c
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/neon/neon.c	Fri Oct 12 14:24:25 2007 -0500
+++ b/src/neon/neon.c	Fri Oct 12 15:06:59 2007 -0500
@@ -783,7 +783,7 @@
 
     _DEBUG("Trying to open '%s' with neon", path);
 
-    if (NULL == (file = malloc(sizeof(VFSFile)))) {
+    if (NULL == (file = g_new0(VFSFile, 1))) {
         _ERROR("Could not allocate memory for filehandle");
         _LEAVE NULL;
     }
@@ -1187,12 +1187,9 @@
     }
 
     _DEBUG("Position to seek to: %ld, current: %ld", newpos, h->pos);
-
-    /* if seek <0, plugin probably wants the beginning of the stream.
-       cope with it. --nenolod */
     if (0 > newpos) {
-        _DEBUG("A seek was requested before start of stream, seeking to start of stream instead.");
-        newpos = 0;
+        _ERROR("Can not seek before start of stream");
+	_LEAVE -1;
     }
 
     if (newpos > content_length) {