Skip to main content
October 4, 2008
Answered

IFmsNotifyAction: long string arguments get corrupted

  • October 4, 2008
  • 1 reply
  • 245 views
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
    This topic has been closed for replies.
    Correct answer osipls
    This is a known issue, fixed already. Please talk to tech support how to get a patch.

    Thanks

    1 reply

    osiplsCorrect answer
    Participating Frequently
    October 7, 2008
    This is a known issue, fixed already. Please talk to tech support how to get a patch.

    Thanks