problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Tom Doust



mama_status mamaDictionary_getDictionaryMessage (mamaDictionary dictionary,mamaMsg* msg)



creates the message it returns using mamaMsg_create (&tempMsg); this creates the message using the default payload which may not be the payload type for the bridge that is trying to populate a message with its dictionary.


Now, while in theory it shouldn’t really matter, in the real world it does, for a variety of reasons.


I can see 2 possible solutions, one is to extend the existing function signature to carry a payload id (or a bridge) so that a payload specific mamaMsg can be created, or better, implement a second function that allows the caller to pre-create the message that is passed in. This second solution would not affect any existing code.


I’ll create and submit a patch, but before I do I’m soliciting comments and proposals for better solutions.





TOM DOUST | Head of Consultancy                                                                                                         


P: +44 (0) 1628 477444 | M: +44 (0) 7710 479924 | E: tom.doust@... | skype:  tom.doust |  



Join to automatically receive all group messages.