in-kernel ORBit2 works



hi, Michael ,
 
i have ported the ORBit2 2.3.100 to linux kernel 2.4.17 , the port is very coarse,
i just palce it in kernel in module, with echoserver in whole.
 
i test it with user-space echo-client and it seems work fine.
 
but there is a strange problem, in function giop_recv_buffer_demarshal_request_1_2 of
giop-recv-buffer.c , before return , i must do this :
 
.....
 buf->msg.u.request_1_2.service_context._buffer = NULL;
  if(giop_IOP_ServiceContextList_demarshal(buf, &buf->msg.u.request_1_2.service_context))
    return TRUE;
  buf->cur = ALIGN_ADDRESS(buf->cur, 8);
  buf->cur +=4;/*<---------------* here, i dont know why must plus 4/

  return FALSE;
}
 
if buf->cur dont plus 4, the params decode error value,use echoString for example,
 
buf->cur
 
address    value
----------------
X x 8        00   <--------------after "buf->cur = ALIGN_ADDRESS(buf->cur, 8)" statement ,the buf->cur point X x 8
X x 8+1
X x 8+2
X x 8+3
X x 8+4      18   <------- string length
X x 8+5
X x 8+6
X x 8+7
X x 8+8      'H'  <--------string begin
X x 8+6      'e'
X x 8+7      'l'
X x 8+8      'l'
...
...
 
 
if buf->cur dont plus 4, in function ORBit_demarshal_value  of corba-any.c,
.....
.....
case CORBA_tk_wstring:
  *val = ALIGN_ADDRESS (*val, ORBIT_ALIGNOF_CORBA_POINTER);
  buf->cur = ALIGN_ADDRESS (buf->cur, sizeof (CORBA_long));
  if ((buf->cur + sizeof (CORBA_long)) > buf->end)
   return TRUE;
  i = *(CORBA_unsigned_long *)buf->cur;/*<------------------------------"i" value will equal 0, so the length of string is 0*/
  if (giop_msg_conversion_needed (buf))
   i = GUINT32_SWAP_LE_BE (i);
  buf->cur += sizeof (CORBA_unsigned_long);/*<-------------and buf->cur will point Xx8+4, which actualy is the address of string length*/
 
.....
....
 
 
 
well, when plus buf->cur by 4 before return in function giop_recv_buffer_demarshal_request_1_2 , every thing seem ok.
 
it is a strange problem.
 
 
i intend to place it to sourceforge,maybe nextweek, because there are lot of trival thing to do and i am busy these days.
 
 
regards
 
                                                                            dou wen
 


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