[Oberon] [Fwd: Oberon Darwin62 port: UDP errors]

Pieter Muller pmuller at gmail.com
Tue Apr 26 18:49:49 CEST 2005


Is anyone actively maintaining the Darwin port?

cheers
-- Pieter

-------- Original Message --------
Subject: 	Oberon Darwin62 port: UDP errors
Date: 	Mon, 25 Apr 2005 12:25:36 +0200
From: 	<joerg.straube at alcatel.ch>
To: 	<muller at inf.ethz.ch>



Hi PJ

I think I detected some errors in the current
"Unix_Oberon_r24_Src" of Unix/ppc.Darwin62.

- "UDPExample" can not be compiled as "IP" is now ARRAY OF CHAR.
  Looking at the code, it seems as "IP" was "LONGINT".
			
 	(* wrong *)
 	IP := ORD(buf[pos+3]);
 	IP := ASH(IP, 8)+ORD(buf[pos+2]);
 	IP := ASH(IP, 8)+ORD(buf[pos+1]);
 	IP := ASH(IP, 8)+ORD(buf[pos]);

- In the Unix version of NetSystem.OpenSocket the variable
  "res" is uninitialized if "B.Socket()" fails. Just move
  the line "res:= error" in the ELSE part in front of B.Socket()

	(* wrong *)
	B.Socket(socket, B.AFINET, B.SOCKDGRAM, B.IPPROTOUDP);
 	IF B.done THEN
 		IF locPort # anyport THEN
 			...
 			B.Bind(socket, myaddr);
 			IF B.done THEN
  				...
 				res:= done;
 			ELSE
				...
 				res:= error
 			END
 		END
 	END

- In the Darwin version NetBase.IPPROTOUDP* is 11 instead of
  11H or 17.
	(* wrong *)
	IPPROTOUDP* = 11; 

Please check and mark for correction in a next release.

Best regards
Joerg





More information about the Oberon mailing list