Skip to content
Snippets Groups Projects
Commit 0ef22a3d authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Fixed oob bug.

Rev: src/modules/files/file.c:1.127
parent 876c4acb
Branches
Tags
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\*/ \*/
#include "global.h" #include "global.h"
RCSID("$Id: file.c,v 1.126 1998/10/21 22:01:01 grubba Exp $"); RCSID("$Id: file.c,v 1.127 1998/10/22 00:10:13 grubba Exp $");
#include "fdlib.h" #include "fdlib.h"
#include "interpret.h" #include "interpret.h"
#include "svalue.h" #include "svalue.h"
...@@ -551,7 +551,7 @@ static struct pike_string *do_read_oob(int fd, ...@@ -551,7 +551,7 @@ static struct pike_string *do_read_oob(int fd,
if(!IS_ZERO(& THIS->read_oob_callback)) if(!IS_ZERO(& THIS->read_oob_callback))
{ {
set_read_callback(FD, file_read_oob_callback, THIS); set_read_oob_callback(FD, file_read_oob_callback, THIS);
SET_INTERNAL_REFERENCE(THIS); SET_INTERNAL_REFERENCE(THIS);
} }
...@@ -561,7 +561,7 @@ static struct pike_string *do_read_oob(int fd, ...@@ -561,7 +561,7 @@ static struct pike_string *do_read_oob(int fd,
}else{ }else{
struct pike_string *foo; /* Per */ struct pike_string *foo; /* Per */
foo = make_shared_binary_string(str->str, bytes_read); foo = make_shared_binary_string(str->str, bytes_read);
free((char *)str); free_string(end_shared_string(str));
return foo; return foo;
} }
...@@ -623,7 +623,7 @@ static struct pike_string *do_read_oob(int fd, ...@@ -623,7 +623,7 @@ static struct pike_string *do_read_oob(int fd,
UNSET_ONERROR(ebuf); UNSET_ONERROR(ebuf);
if(!IS_ZERO(& THIS->read_oob_callback)) if(!IS_ZERO(& THIS->read_oob_callback))
{ {
set_read_callback(FD, file_read_oob_callback, THIS); set_read_oob_callback(FD, file_read_oob_callback, THIS);
SET_INTERNAL_REFERENCE(THIS); SET_INTERNAL_REFERENCE(THIS);
} }
return low_free_buf(&b); return low_free_buf(&b);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment