Bug in ORBit 0.5.1 with floats/doubles ?



I am not sure if this is a known bug, I have not been able to find it anywhere.

I am using C server code, and Java client code (IBM 1.3).

I know my ORBit version is old, but is this bug knowingly fixed ? I 
will be running this ORBit object on multiple machines. (And when I 
am at it, what are the plans Sebastian Wilhelmi's multithread 
implementation ?)

floats and doubles passed from Java to C as part of a structure does not work.

I assume that CORBA_float in C is compatible with float ? Or is this 
my mistake ? Do I have to call anything to convert it ?

Here is a binary dump of a C structure with the wrong contents, and 
the right contents (the . is where one field ends and the next begins)

*** x1	Thu Aug 24 16:37:31 2000
--- x2	Thu Aug 24 16:37:31 2000
***************
*** 1,7 ****
   000000 37 36 30 30 39 32 34 34 35 36 31 00 00 00 00 00
   000010 00 00 00 00 00 00 00 00.07 00 00 00.08 00 00 00
   000020 39 39 39 31 30 33 32 36 00 00 00 00 00 00 00 00
! 000030 00 00 00 00 00 00 00 00.00 d0 81 4e.d0 00 00 00
   000040 45 6e 74 65 72 70 72 69 73 65 20 41 64 76 65 72
   000050 74 69 73 69 6e 67 20 41 2f 53 00 00 00 00 00 00
   000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
--- 1,7 ----
   000000 37 36 30 30 39 32 34 34 35 36 31 00 00 00 00 00
   000010 00 00 00 00 00 00 00 00 07 00 00 00 08 00 00 00
   000020 39 39 39 31 30 33 32 36 00 00 00 00 00 00 00 00
! 000030 00 00 00 00 00 00 00 00 00 00 e8 40 d0 00 00 00
   000040 45 6e 74 65 72 70 72 69 73 65 20 41 64 76 65 72
   000050 74 69 73 69 6e 67 20 41 2f 53 00 00 00 00 00 00
   000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

The value should be 7.25 but is  1088946176.0. I have 00d0814e vs. 0000e840

Here is my IDL file (I am having the problem in RequestAuth btw).

module Cashcow {
	typedef long Action;

	struct TransactionT  {
			  string card_number; // [21] in C + align
	   		  long card_expirymonth;
			  long card_expiryyear;

			  string transaction_reference; // [21] in C
			  float transaction_amount;
			  long transaction_currency;

			  string merchant_name;
			  string merchant_address;
			  string merchant_city;
			  string merchant_zip;
			  string merchant_region;
			  string merchant_country;
			  long   merchant_poscode;
			  string merchant_number;
			  string merchant_terminalid;

			  long result_action;
               string result_approval;
			  string result_ticket;
			  string cashcow;
	  };
	  interface CashcowCORBA {
	  	long InitCashcow( in string passphrase, in string rc4key );

		Action RequestCapture (in string ticket,
			in string userKey, in double actualAmount);

		Action RequestAuth (in TransactionT t,
					out string ticket,
					in string userKey);

		string getactiontext (in Action a);

		Action ParseCaptureResponse(in string input);

		Action ParseAuthResponse(in string input, in TransactionT t);
       };
};
-- 

NetGuide Danmark aps
Povl H. Pedersen, Chief Technology Officer

Member of the Catenas network.

ÅRHUS: Skolegade 19A, DK-8000 Aarhus C.
KØBENHAVN: Forskerbyen Symbion, box 367, Fruebjergvej 3. DK-2100 København Ø
HELSINGBORG: Bredgatan 6, 25114 Helsingborg, Sverige
KAMPALA:  Bukoto Street 78, Kamwokya, P.O.Box 28483, Kampala, Uganda

Phone +45  8618 1845 - Fax +45 8618 1863
GSM +45 4093 5511
E-mail: pope@netguide.dk - PGP Key ID: 0x8F4BC755
URL: http://www.netguide.dk





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]