void LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest(const LLUUID& avatar_id)
{
	// this is the startup state when send_complete_agent_movement() message is sent.
	// Before this, the AvatarPropertiesRequest message  
	// won't work so don't bother trying
	if (LLStartUp::getStartupState() <= STATE_AGENT_SEND)
	{
		return;
	}

	if (isPendingRequest(avatar_id, APT_PROPERTIES))
	{
		// waiting for a response, don't re-request
		return;
	}
	// indicate we're going to make a request
	addPendingRequest(avatar_id, APT_PROPERTIES);

	LLMessageSystem *msg = gMessageSystem;

	msg->newMessageFast(_PREHASH_AvatarPropertiesRequest);
	msg->nextBlockFast( _PREHASH_AgentData);
	msg->addUUIDFast(   _PREHASH_AgentID, gAgent.getID() );
	msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
	msg->addUUIDFast(   _PREHASH_AvatarID, avatar_id);
	gAgent.sendReliableMessage();
}
void LLAvatarPropertiesProcessor::sendGenericRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string method)
{
	// Suppress duplicate requests while waiting for a response from the network
	if (isPendingRequest(avatar_id, type))
	{
		// waiting for a response, don't re-request
		return;
	}
	// indicate we're going to make a request
	addPendingRequest(avatar_id, type);

	std::vector<std::string> strings;
	strings.push_back( avatar_id.asString() );
	send_generic_message(method, strings);
}
void LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest(const LLUUID& avatar_id)
{
	if (isPendingRequest(avatar_id, APT_PROPERTIES))
	{
		// waiting for a response, don't re-request
		return;
	}
	// indicate we're going to make a request
	addPendingRequest(avatar_id, APT_PROPERTIES);

	LLMessageSystem *msg = gMessageSystem;

	msg->newMessageFast(_PREHASH_AvatarPropertiesRequest);
	msg->nextBlockFast( _PREHASH_AgentData);
	msg->addUUIDFast(   _PREHASH_AgentID, gAgent.getID() );
	msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
	msg->addUUIDFast(   _PREHASH_AvatarID, avatar_id);
	gAgent.sendReliableMessage();
}