if (!serialize_addr(codec, src_addr)) return CORBA_FALSE;
}
if (!CORBA_string_serialize(codec, &orb_id)) return CORBA_FALSE;
+ /* All headers must be 8 byte aligned so align the length of
+ * this message */
+ if (!FORB_CDR_put_align(codec, 8)) return CORBA_FALSE;
if (!forb_iop_prepend_message_header(codec, forb_iop_HELLO)) return CORBA_FALSE;
return CORBA_TRUE;
}
forb_iop_REPLY_HEADER_SIZE);
forb_exception_serialize(codec, env);
}
+ /* All headers must be 8 byte aligned so align the length of
+ * this message */
+ if (!FORB_CDR_put_align(codec, 8)) {
+ ul_logerr("Not enough space for tail align\n");
+ return; /* FIXME: handle error (goto above)*/
+ }
/* forb_iop_REPLY_HEADER_SIZE equals to 8 even if the real
* header is shorter. We want reply data to be 8 byte
* aligned */
forb_peer_put(port->new_peer);
port->new_peer = NULL;
}
+
+ FORB_CDR_get_align(codec, 8);
+
if (FORB_CDR_data_size(codec) != data_size - mh->message_size) {
size_t processed = data_size - FORB_CDR_data_size(codec);
ul_logmsg("Message of type %d handled incorrectly (size=%d, processed=%d); fixing\n",
req->env = env; /* Remember, where to return exceptions */
+ /* All headers must be 8 byte aligned so align the length of
+ * this message */
+ if (!FORB_CDR_put_align(&req->cdr_request, 8)) {
+ env->major = FORB_EX_INTERNAL;
+ ul_logerr("Not enough space for tail align\n");
+ return;
+ }
+
ret = forb_iop_prepend_message_header(&req->cdr_request, forb_iop_REQUEST);
if (!ret) {
/* This should never happen */