Answered
IFmsNotifyAction: long string arguments get corrupted
I'm using addNotifyAction in an Auth plugin to trigger a
function in the AS application code. As shown in the samples, I'm
passing an FmsVariant variable to addParam to add a string value to
the argument list. Apparently, if I pass a string longer than 32
characters, it somewhere gets corrupted. If I log its value through
"trace" from the AS code, I often get random garbage, sometimes
including part of the orginal value and/or part of other strings
that don't belong there. If I use a shorter string, everything
works fine. I reproduced the same problem using the original
AuthModule.cpp sample code, to which I just added the following
code (in MyFmsNotifyEvent::notify):
FmsVariant field;
if (m_pAev->getField(IFmsAuthEvent::F_CLIENT_ID, field) == IFmsAuthEvent::S_SUCCESS)
{
IFmsNotifyAction* pAction = m_pAev->addNotifyAction("Notified by adaptor");
pAction->setClientId(field);
field.setString("myfunc");
pAction->setMethodName(field);
field.setString("012345678901234567890123456789012"); // 33 chars
pAction->addParam(field);
}
In the application main.asc, I just added:
Client.prototype.myfunc(arg) { trace(arg); }
I'm using FMS3 under Linux. Are there any known issues?
Max
FmsVariant field;
if (m_pAev->getField(IFmsAuthEvent::F_CLIENT_ID, field) == IFmsAuthEvent::S_SUCCESS)
{
IFmsNotifyAction* pAction = m_pAev->addNotifyAction("Notified by adaptor");
pAction->setClientId(field);
field.setString("myfunc");
pAction->setMethodName(field);
field.setString("012345678901234567890123456789012"); // 33 chars
pAction->addParam(field);
}
In the application main.asc, I just added:
Client.prototype.myfunc(arg) { trace(arg); }
I'm using FMS3 under Linux. Are there any known issues?
Max
