Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP ToolTalk Programmer's Guide > Chapter 6 Participating in ToolTalk Sessions

Sending and Receiving Messages in the Same Process

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

Normally, the receiver deletes the message when it has completed the requested operation; however, the ToolTalk service uses the same message ID for both the receiver and the requestor. When sending and receiving messages in the same process, these features cause the message underneath the requestor to be deleted as well.

One workaround is to put a refcount on the message. To do this, use the tt_message_user[_set]() function.

Another workaround is to destroy the message in the receiver only if the sender is not the current procid; for example:

Tt_callback_action
my_pattern_callback(Tt_message m, Tt_pattern p)
{
/* normal message processing goes here */

if (0!=strcmp(tt_message_sender(m),
tt_default_procid()){
}
return TT_CALLBACK_PROCESSED;

}
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.