I have been trying out py-openDX, and failed to get any tests working
which involve macro definitions. After a little poking around, I
think I found an error in the current version of libDXL.
If I turn on DXLSetMessageDebugging(conn,1) I see every messageinside
a macro definition send twice... one unpacketized, the other
packetized.
Looking in /src/uipp/dxl/send.c
DXLError
DXLSend(DXLConnection *conn, const char *string)
{
DXLPacketTypeEnum ptype=PACK_FOREGROUND;
if (conn->dxuiConnected) {
if (conn->majorVersion <= 2)
ptype = PACK_FOREGROUND;
else
ptype = PACK_LINK;
} else if (conn->macroDef) {
DXLSendUnpacketized(conn, string);
} else {
/* FIXME: is it sufficient to always send in the foreground */
ptype = PACK_FOREGROUND;
}
return DXLSendPacket(conn, ptype, string) >= 0 ? OK : ERROR;
}
Note that the DXLSendUnpacketized presumably should say
return DXLSendUnpacketized(conn, string)
since otherwise this falls through and resends the packet (exactly as seen)
Does anyone have other reason to believe that libDXL is working
correctly right now for macros? If not, could one of the people with
CVS access please verify the fix I suggest and check it in if it is
OK?
Thanks.
Marcus Mendenhall