Example #1
0
void blockingCommandReply(DISPATCH_PTR dispatch, X_IPC_MSG_CLASS_TYPE msg_class)
{
  DISPATCH_PTR replyDispatch;
  
  replyDispatch = dispatchAllocate();
  replyDispatch->msg = dispatch->msg;
  
  replyDispatch->org = dispatch->org;
  replyDispatch->orgId = dispatch->orgId;
  
  replyDispatch->refId = dispatch->refId;
  
  DISPATCH_SET_STATUS(AttendingDispatch, replyDispatch);
  
  centralReply(replyDispatch, (char *)&msg_class);
}
Example #2
0
static void getVarHnd(DISPATCH_PTR dispatch, void *empty)
{
#ifdef UNUSED_PRAGMA
#pragma unused(empty)
#endif
  
  GLOBAL_VAR_PTR var=NULL;
  const char *msgName;
  const char *varName;
  
  msgName = dispatch->msg->msgData->name;
  varName = &(msgName[strlen(VAR_SET_PREFIX)]);
  var = (GLOBAL_VAR_PTR) x_ipc_hashTableFind(varName, GET_S_GLOBAL(varTable));
  if (var == NULL) {
    /* handle the error here. */
  } else {
    centralReply(dispatch, (char *)var->value);
  }
}
Example #3
0
static void getSetVarHnd(DISPATCH_PTR dispatch, void *varValue)
{
  GLOBAL_VAR_PTR var=NULL;
  const char *msgName;
  const char *varName;
  
  msgName = dispatch->msg->msgData->name;
  varName = &(msgName[strlen(VAR_GET_SET_PREFIX)]);
  var = (GLOBAL_VAR_PTR) x_ipc_hashTableFind(varName, GET_S_GLOBAL(varTable));
  if (var == NULL) {
    /* handle the error here. */
  } else {
    /* Free the old data if it exists */
    if (var->value != NULL) {
      centralReply(dispatch, (char *)var->value);
      x_ipcFreeData(msgName,var->value);
    }
    /* Store the pointer to the new data */
    var->value = varValue;
  }
}
Example #4
0
X_IPC_RETURN_VALUE_TYPE centralNullReply(DISPATCH_PTR dispatch)
{
  return centralReply(dispatch, (void *) NULL);
}