void jus::Service::onClientData(jus::Buffer& _value) { uint32_t tmpID = _value.getTransactionId(); uint32_t clientId = _value.getClientId();; auto it = m_callMultiData.begin(); while (it != m_callMultiData.end()) { if ( it->getTransactionId() == tmpID && it->getClientId() == clientId) { JUS_WARNING("Append data ... " << tmpID); it->appendData(_value); if (it->isFinished() == true) { JUS_WARNING("CALL Function ..."); callBinary(tmpID, it->getRaw()); it = m_callMultiData.erase(it); } return; } ++it; } jus::FutureCall futCall(clientId, tmpID, _value); if (futCall.isFinished() == true) { JUS_INFO("Call Binary .."); callBinary(tmpID, futCall.getRaw()); } else { m_callMultiData.push_back(futCall); } }
int TransactionalSetImpl::size() { std::auto_ptr<protocol::ClientMessage> request = protocol::codec::TransactionalSetSizeCodec::RequestParameters::encode( getName(), getTransactionId(), util::getThreadId()); return invokeAndGetResult<int, protocol::codec::TransactionalSetSizeCodec::ResponseParameters>(request); }
bool TransactionalSetImpl::remove(const serialization::pimpl::Data& e) { std::auto_ptr<protocol::ClientMessage> request = protocol::codec::TransactionalSetRemoveCodec::RequestParameters::encode( getName(), getTransactionId(), util::getThreadId(), e); return invokeAndGetResult<bool, protocol::codec::TransactionalSetRemoveCodec::ResponseParameters>(request); }
int TransactionalMultiMapImpl::valueCount(const serialization::pimpl::Data &key) { std::auto_ptr<protocol::ClientMessage> request = protocol::codec::TransactionalMultiMapValueCountCodec::RequestParameters::encode( getName(), getTransactionId(), util::getThreadId(), key); return invokeAndGetResult<int, protocol::codec::TransactionalMultiMapValueCountCodec::ResponseParameters>( request); }
void XDebugHook::onOpcode(PC pc) { auto server = XDEBUG_GLOBAL(Server); if (server == nullptr) { return; } // Likely case is that there was no break command. auto brk = server->getAndClearBreak(); if (LIKELY(brk == nullptr)) { return; } server->log("Request thread received break command"); VMRegAnchor anchor; auto const unit = vmfp()->func()->unit(); auto const line = unit->getLineNumber(unit->offsetOf(pc)); auto const filepath = const_cast<StringData*>(unit->filepath()); auto const transpath = File::TranslatePath(String(filepath)); // XDebugServer::breakpoint will send the response for the command before the // break command, but we first need to send a response for the break command. auto response = xdebug_xml_node_init("response"); server->addXmlns(*response); auto const& cmd_str = brk->getCommandStr(); auto const& trans_id = brk->getTransactionId(); // Manually add status and reason. XDebugServer still thinks we're running // because we haven't run XDebugServer::breakpoint yet. xdebug_xml_add_attribute(response, "status", "break"); xdebug_xml_add_attribute(response, "reason", "ok"); // Ditto with command, XDebugServer is tracking the command before the break. xdebug_xml_add_attribute_dup(response, "command", cmd_str.data()); xdebug_xml_add_attribute_dup(response, "transaction_id", trans_id.data()); delete brk; server->sendMessage(*response); xdebug_xml_node_dtor(response); // Now we can go into a command loop. server->breakpoint(transpath, init_null(), init_null(), line); }
char* osmsMessageRightsAuthorizationResponse::encode() { XMLDocument* pDoc = new XMLDocument(); if (pDoc == NULL) return NULL; if (!pDoc->decode(xmlTemplate(), getName())) { delete pDoc; return NULL; } pDoc->setInteger("MessageType", getMessageType()); pDoc->setString("TransactionId", getTransactionId()); char *result = pDoc->encode(); delete pDoc; return result; }
/* * returns the pk_uid of the transaction selected in the transactions table */ int MainWindow::getTransactionId() { int rowId; rowId = ui->tableTransactions->selectionModel()->currentIndex().row(); return getTransactionId(rowId); }