void IOFWCompareAndSwapCommand::gotPacket( int rcode, const void* data, int size ) { setResponseCode( rcode ); IOReturn result = kIOReturnSuccess; unsigned int i; if( rcode != kFWResponseComplete ) { //IOLog("Received rcode %d for lock command %p, nodeID %x\n", rcode, this, fNodeID); complete( kIOFireWireResponseBase + rcode ); return; } if( size != (fSize / 2) ) { // IOLog("Bad Lock Response Length for node %x (%08x instead of %08x)\n", fNodeID,size,fSize / 2); result = kIOFireWireInvalidResponseLength; } unsigned int clipped_size = size; if( clipped_size > sizeof(fOldVal) ) { clipped_size = sizeof(fOldVal); } for( i = 0; i < clipped_size / 4; i++ ) { fOldVal[i] = ((UInt32 *)data)[i]; } complete( result ); }
NivisCustom64765Operation::NivisCustom64765Operation(Address32 owner_, uint16_t CommandId_,uint16_t Nickname_, _device_address_t DeviceUniqueId_, uint8_t CommandSize_, uint8_t* Command_) { owner = owner_; this->CommandId = CommandId_; this->Nickname = Nickname_; std::memcpy(this->DeviceUniqueId, DeviceUniqueId_, 5); this->CommandSize = CommandSize_; std::memcpy(this->Command, Command_, CommandSize_); setResponseCode(0); }
void KMSmtpClient::updateResponseCode(const QString &responseText) { //Extract the respose code from the server's responce //(first 3 digits) setResponseCode(responseText.left(3).toInt()); }