List Info

Thread: Missing second byte -nextHunk (again)




Missing second byte -nextHunk (again)
country flaguser name
Korea, Republic of
2007-03-04 03:45:32
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

OOPS!, 2.3.3 version I'm using.

Hi,

I've created simple echo server which uses nextHunk method.
But if I
send "hello" string, only "hllo" is
returned, for "hllo", "hlo" is
returned.

It seems that second byte of data is missing. If I use other
method like
upTo: this problem did not happened. I'm using 2.3.3 (latest
version,
right?).

Thanks in advance.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFF6pU8QqspS1+XJHgRAksvAJ4kfURDilmg+iJtIAmta5n+U2ISBACg
xlaT
2uKNkOqxIbBPwLzJX9TW7EU=
=zF9B
-----END PGP SIGNATURE-----


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

Re: Missing second byte -nextHunk (again)
country flaguser name
Italy
2007-03-04 07:42:38
> second byte of data is missing. If I use other method
like
> upTo: this problem did not happened. I'm using 2.3.3
(latest version,
> right?).

Can you please send the source code?

Thanks,

Paolo


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

Re: Missing second byte -nextHunk (again)
country flaguser name
Korea, Republic of
2007-03-04 19:32:28
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Attached file is simple echo server and I did test with
nc(netcat)
like this;

echo -e "hellorn" | nc localhost 8123

again, which returns "hllo" instead of correct
"hello".

Thanks in advance.

Paolo Bonzini wrote:
> Can you please send the source code?
> 
> Thanks,
> 
> Paolo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD4DBQFF63MrQqspS1+XJHgRAu0HAKCDosZPK6glYOSEDSnC8CMe9U/AWgCW
OtLc
1SxbzA+tTyIg76Iw0F7Ytw==
=G+GN
-----END PGP SIGNATURE-----

_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

  
Re: Missing second byte -nextHunk (again)
country flaguser name
Switzerland
2007-03-09 07:38:59
> Attached file is simple echo server and I did test with
nc(netcat)
> like this;
> 
> echo -e "hellorn" | nc localhost 8123
> 
> again, which returns "hllo" instead of
correct "hello".

This was caused by the changes to Stream>>#copyFrom:. 
It is fixed
as in this patch:

--- orig/tcp/Buffers.st
+++ mod/tcp/Buffers.st

 -111,7
+111,7  bufferContents
     "Answer the data that is in the buffer, and empty
it."
     | contents |
     self basicAtEnd ifTrue: [ ^self species new: 0 ].
-    contents := self copyFrom: ptr to: endPtr.
+    contents := self collection copyFrom: ptr to: endPtr.
     endPtr := ptr - 1. "Empty the buffer"
     ^contents
 !

Paolo


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )