diff options
author | Adam Moss <moss@lindenlab.com> | 2009-04-16 23:45:35 +0000 |
---|---|---|
committer | Adam Moss <moss@lindenlab.com> | 2009-04-16 23:45:35 +0000 |
commit | b01c75cb423f07a3d3354f8bd62f265f80062b3b (patch) | |
tree | dec1b220c24a60cc220d1cb07fd3545610644f0a /indra/newview/llviewermessage.cpp | |
parent | 868250bdd74f348557102c0d8408d9bec30331f6 (diff) |
svn merge -r117314:117337
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/mv13a-merge-1
QAR-1343 maint-viewer-13a+libcurlexploitfix-3-3 combo merge
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 73 |
1 files changed, 22 insertions, 51 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6ffb19bcdf..088ba62d0c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1343,27 +1343,6 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) LLNotifications::instance().add(p); } - -bool group_vote_callback(const LLSD& notification, const LLSD& response) -{ - LLUUID group_id = notification["payload"]["group_id"].asUUID(); - S32 option = LLNotification::getSelectedOption(notification, response); - switch(option) - { - case 0: - // Vote Now - // Open up the voting tab - LLFloaterGroupInfo::showFromUUID(group_id, "voting_tab"); - break; - default: - // Vote Later or - // close button - break; - } - return false; -} -static LLNotificationFunctorRegistration group_vote_callback_reg("GroupVote", group_vote_callback); - bool lure_callback(const LLSD& notification, const LLSD& response) { S32 option = 0; @@ -1514,7 +1493,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // initiated by the other party) then... std::string my_name; gAgent.buildFullname(my_name); - std::string response = gSavedPerAccountSettings.getText("BusyModeResponse"); + std::string response = gSavedPerAccountSettings.getString("BusyModeResponse2"); pack_instant_message( gMessageSystem, gAgent.getID(), @@ -1847,17 +1826,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLNotifications::instance().add("InventoryDeclined", args); break; } + // TODO: _DEPRECATED suffix as part of vote removal - DEV-24856 case IM_GROUP_VOTE: - { - LLSD args; - args["NAME"] = name; - args["MESSAGE"] = message; - - LLSD payload; - payload["group_id"] = session_id; - LLNotifications::instance().add("GroupVote", args, payload); - } - break; + { + LL_WARNS("Messaging") << "Received IM: IM_GROUP_VOTE_DEPRECATED" << LL_ENDL; + } + break; case IM_GROUP_ELECTION_DEPRECATED: { @@ -2113,7 +2087,7 @@ void busy_message (LLMessageSystem* msg, LLUUID from_id) { std::string my_name; gAgent.buildFullname(my_name); - std::string response = gSavedPerAccountSettings.getText("BusyModeResponse"); + std::string response = gSavedPerAccountSettings.getString("BusyModeResponse2"); pack_instant_message( gMessageSystem, gAgent.getID(), @@ -4362,11 +4336,11 @@ void mean_name_callback(const LLUUID &id, const std::string& first, const std::s return; } - static const int max_collision_list_size = 20; + static const U32 max_collision_list_size = 20; if (gMeanCollisionList.size() > max_collision_list_size) { mean_collision_list_t::iterator iter = gMeanCollisionList.begin(); - for (S32 i=0; i<max_collision_list_size; i++) iter++; + for (U32 i=0; i<max_collision_list_size; i++) iter++; for_each(iter, gMeanCollisionList.end(), DeletePointer()); gMeanCollisionList.erase(iter, gMeanCollisionList.end()); } @@ -5217,17 +5191,22 @@ static LLNotificationFunctorRegistration callback_script_dialog_reg_2("ScriptDia void process_script_dialog(LLMessageSystem* msg, void**) { S32 i; - LLSD payload; + LLUUID object_id; + msg->getUUID("Data", "ObjectID", object_id); + + if (LLMuteList::getInstance()->isMuted(object_id)) + { + return; + } + std::string message; std::string first_name; std::string last_name; std::string title; - LLUUID object_id; S32 chat_channel; - msg->getUUID("Data", "ObjectID", object_id); msg->getString("Data", "FirstName", first_name); msg->getString("Data", "LastName", last_name); msg->getString("Data", "ObjectName", title); @@ -5526,25 +5505,18 @@ void onCovenantLoadComplete(LLVFS *vfs, S32 file_length = file.getSize(); - char* buffer = new char[file_length+1]; - if (buffer == NULL) - { - LL_ERRS("Messaging") << "Memory Allocation failed" << LL_ENDL; - return; - } - - file.read((U8*)buffer, file_length); /* Flawfinder: ignore */ - + std::vector<char> buffer(file_length+1); + file.read((U8*)&buffer[0], file_length); // put a EOS at the end - buffer[file_length] = 0; + buffer[file_length] = '\0'; - if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) + if( (file_length > 19) && !strncmp( &buffer[0], "Linden text version", 19 ) ) { LLViewerTextEditor* editor = new LLViewerTextEditor(std::string("temp"), LLRect(0,0,0,0), file_length+1); - if( !editor->importBuffer( buffer, file_length+1 ) ) + if( !editor->importBuffer( &buffer[0], file_length+1 ) ) { LL_WARNS("Messaging") << "Problem importing estate covenant." << LL_ENDL; covenant_text = "Problem importing estate covenant."; @@ -5554,7 +5526,6 @@ void onCovenantLoadComplete(LLVFS *vfs, // Version 0 (just text, doesn't include version number) covenant_text = editor->getText(); } - delete[] buffer; delete editor; } else |