aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:50 -0500
committerJacek Antonelli2008-08-15 23:45:50 -0500
commit2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch)
tree95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/newview/llviewermessage.cpp
parentSecond Life viewer sources 1.20.6 (diff)
downloadmeta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz
Second Life viewer sources 1.20.7
Diffstat (limited to 'linden/indra/newview/llviewermessage.cpp')
-rw-r--r--linden/indra/newview/llviewermessage.cpp262
1 files changed, 133 insertions, 129 deletions
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index a9adbcd..7cc833a 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -202,7 +202,7 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_
202{ 202{
203 if(0 == amount) return; 203 if(0 == amount) return;
204 amount = abs(amount); 204 amount = abs(amount);
205 llinfos << "give_money(" << uuid << "," << amount << ")"<< llendl; 205 LL_INFOS("Messaging") << "give_money(" << uuid << "," << amount << ")"<< LL_ENDL;
206 if(can_afford_transaction(amount)) 206 if(can_afford_transaction(amount))
207 { 207 {
208// gStatusBar->debitBalance(amount); 208// gStatusBar->debitBalance(amount);
@@ -242,7 +242,7 @@ void send_complete_agent_movement(const LLHost& sim_host)
242void process_logout_reply(LLMessageSystem* msg, void**) 242void process_logout_reply(LLMessageSystem* msg, void**)
243{ 243{
244 // The server has told us it's ok to quit. 244 // The server has told us it's ok to quit.
245 llinfos << "process_logout_reply" << llendl; 245 LL_DEBUGS("Messaging") << "process_logout_reply" << LL_ENDL;
246 246
247 LLUUID agent_id; 247 LLUUID agent_id;
248 msg->getUUID("AgentData", "AgentID", agent_id); 248 msg->getUUID("AgentData", "AgentID", agent_id);
@@ -250,7 +250,7 @@ void process_logout_reply(LLMessageSystem* msg, void**)
250 msg->getUUID("AgentData", "SessionID", session_id); 250 msg->getUUID("AgentData", "SessionID", session_id);
251 if((agent_id != gAgent.getID()) || (session_id != gAgent.getSessionID())) 251 if((agent_id != gAgent.getID()) || (session_id != gAgent.getSessionID()))
252 { 252 {
253 llwarns << "Bogus Logout Reply" << llendl; 253 LL_WARNS("Messaging") << "Bogus Logout Reply" << LL_ENDL;
254 } 254 }
255 255
256 LLInventoryModel::update_map_t parents; 256 LLInventoryModel::update_map_t parents;
@@ -268,7 +268,7 @@ void process_logout_reply(LLMessageSystem* msg, void**)
268 268
269 // We do not need to track the asset ids, just account for an 269 // We do not need to track the asset ids, just account for an
270 // updated inventory version. 270 // updated inventory version.
271 llinfos << "process_logout_reply itemID=" << item_id << llendl; 271 LL_INFOS("Messaging") << "process_logout_reply itemID=" << item_id << LL_ENDL;
272 LLInventoryItem* item = gInventory.getItem( item_id ); 272 LLInventoryItem* item = gInventory.getItem( item_id );
273 if( item ) 273 if( item )
274 { 274 {
@@ -277,7 +277,7 @@ void process_logout_reply(LLMessageSystem* msg, void**)
277 } 277 }
278 else 278 else
279 { 279 {
280 llinfos << "process_logout_reply item not found: " << item_id << llendl; 280 LL_INFOS("Messaging") << "process_logout_reply item not found: " << item_id << LL_ENDL;
281 } 281 }
282 } 282 }
283 LLAppViewer::instance()->forceQuit(); 283 LLAppViewer::instance()->forceQuit();
@@ -300,15 +300,15 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
300 size = mesgsys->getSizeFast(_PREHASH_LayerData, _PREHASH_Data); 300 size = mesgsys->getSizeFast(_PREHASH_LayerData, _PREHASH_Data);
301 if (0 == size) 301 if (0 == size)
302 { 302 {
303 llwarns << "Layer data has zero size." << llendl; 303 LL_WARNS("Messaging") << "Layer data has zero size." << LL_ENDL;
304 return; 304 return;
305 } 305 }
306 if (size < 0) 306 if (size < 0)
307 { 307 {
308 // getSizeFast() is probably trying to tell us about an error 308 // getSizeFast() is probably trying to tell us about an error
309 llwarns << "getSizeFast() returned negative result: " 309 LL_WARNS("Messaging") << "getSizeFast() returned negative result: "
310 << size 310 << size
311 << llendl; 311 << LL_ENDL;
312 return; 312 return;
313 } 313 }
314 U8 *datap = new U8[size]; 314 U8 *datap = new U8[size];
@@ -345,7 +345,7 @@ void export_complete()
345 gExporterRequestID.setNull(); 345 gExporterRequestID.setNull();
346 gExportDirectory = ""; 346 gExportDirectory = "";
347 347
348 FILE* fXML = LLFile::fopen(gExportedFile.c_str(), "rb"); /* Flawfinder: ignore */ 348 LLFILE* fXML = LLFile::fopen(gExportedFile.c_str(), "rb"); /* Flawfinder: ignore */
349 fseek(fXML, 0, SEEK_END); 349 fseek(fXML, 0, SEEK_END);
350 long length = ftell(fXML); 350 long length = ftell(fXML);
351 fseek(fXML, 0, SEEK_SET); 351 fseek(fXML, 0, SEEK_SET);
@@ -353,7 +353,7 @@ void export_complete()
353 size_t nread = fread(buffer, 1, length, fXML); 353 size_t nread = fread(buffer, 1, length, fXML);
354 if (nread < (size_t) length) 354 if (nread < (size_t) length)
355 { 355 {
356 llwarns << "Short read" << llendl; 356 LL_WARNS("Messaging") << "Short read" << LL_ENDL;
357 } 357 }
358 buffer[nread] = '\0'; 358 buffer[nread] = '\0';
359 fclose(fXML); 359 fclose(fXML);
@@ -375,12 +375,12 @@ void export_complete()
375 375
376 LLUUID image_uuid(image_uuid_str); 376 LLUUID image_uuid(image_uuid_str);
377 377
378 llinfos << "Found UUID: " << image_uuid << llendl; 378 LL_INFOS("Messaging") << "Found UUID: " << image_uuid << LL_ENDL;
379 379
380 std::map<LLUUID, LLString>::iterator itor = gImageChecksums.find(image_uuid); 380 std::map<LLUUID, LLString>::iterator itor = gImageChecksums.find(image_uuid);
381 if (itor != gImageChecksums.end()) 381 if (itor != gImageChecksums.end())
382 { 382 {
383 llinfos << "Replacing with checksum: " << itor->second << llendl; 383 LL_INFOS("Messaging") << "Replacing with checksum: " << itor->second << LL_ENDL;
384 if (itor->second.c_str() != NULL) 384 if (itor->second.c_str() != NULL)
385 { 385 {
386 memcpy(&pos_check[10], itor->second.c_str(), 32); /* Flawfinder: ignore */ 386 memcpy(&pos_check[10], itor->second.c_str(), 32); /* Flawfinder: ignore */
@@ -390,10 +390,10 @@ void export_complete()
390 } 390 }
391 } 391 }
392 392
393 FILE* fXMLOut = LLFile::fopen(gExportedFile.c_str(), "wb"); /* Flawfinder: ignore */ 393 LLFILE* fXMLOut = LLFile::fopen(gExportedFile.c_str(), "wb"); /* Flawfinder: ignore */
394 if (fwrite(buffer, 1, length, fXMLOut) != length) 394 if (fwrite(buffer, 1, length, fXMLOut) != length)
395 { 395 {
396 llwarns << "Short write" << llendl; 396 LL_WARNS("Messaging") << "Short write" << LL_ENDL;
397 } 397 }
398 fclose(fXMLOut); 398 fclose(fXMLOut);
399 399
@@ -407,14 +407,14 @@ void exported_item_complete(const LLTSCode status, void *user_data)
407 407
408 if (status < LLTS_OK) 408 if (status < LLTS_OK)
409 { 409 {
410 llinfos << "Export failed!" << llendl; 410 LL_WARNS("Messaging") << "Export failed!" << LL_ENDL;
411 } 411 }
412 else 412 else
413 { 413 {
414 ++current_object_count; 414 ++current_object_count;
415 if (current_image_count == exported_image_count && current_object_count == exported_object_count) 415 if (current_image_count == exported_image_count && current_object_count == exported_object_count)
416 { 416 {
417 llinfos << "*** Export complete ***" << llendl; 417 LL_INFOS("Messaging") << "*** Export complete ***" << LL_ENDL;
418 418
419 export_complete(); 419 export_complete();
420 } 420 }
@@ -442,11 +442,11 @@ void exported_j2c_complete(const LLTSCode status, void *user_data)
442 442
443 if (status < LLTS_OK) 443 if (status < LLTS_OK)
444 { 444 {
445 llinfos << "Image download failed!" << llendl; 445 LL_WARNS("Messaging") << "Image download failed!" << LL_ENDL;
446 } 446 }
447 else 447 else
448 { 448 {
449 FILE* fIn = LLFile::fopen(filename.c_str(), "rb"); /* Flawfinder: ignore */ 449 LLFILE* fIn = LLFile::fopen(filename.c_str(), "rb"); /* Flawfinder: ignore */
450 if (fIn) 450 if (fIn)
451 { 451 {
452 LLPointer<LLImageJ2C> ImageUtility = new LLImageJ2C; 452 LLPointer<LLImageJ2C> ImageUtility = new LLImageJ2C;
@@ -458,7 +458,7 @@ void exported_j2c_complete(const LLTSCode status, void *user_data)
458 U8 *buffer = ImageUtility->allocateData(length); 458 U8 *buffer = ImageUtility->allocateData(length);
459 if (fread(buffer, 1, length, fIn) != length) 459 if (fread(buffer, 1, length, fIn) != length)
460 { 460 {
461 llwarns << "Short read" << llendl; 461 LL_WARNS("Messaging") << "Short read" << LL_ENDL;
462 } 462 }
463 fclose(fIn); 463 fclose(fIn);
464 LLFile::remove(filename.c_str()); 464 LLFile::remove(filename.c_str());
@@ -481,14 +481,14 @@ void exported_j2c_complete(const LLTSCode status, void *user_data)
481 delete [] file_path; 481 delete [] file_path;
482 //S32 name_len = output_file.length(); 482 //S32 name_len = output_file.length();
483 //strcpy(&output_file[name_len-3], "tga"); 483 //strcpy(&output_file[name_len-3], "tga");
484 FILE* fOut = LLFile::fopen(output_file.c_str(), "wb"); /* Flawfinder: ignore */ 484 LLFILE* fOut = LLFile::fopen(output_file.c_str(), "wb"); /* Flawfinder: ignore */
485 char md5_hash_string[33]; /* Flawfinder: ignore */ 485 char md5_hash_string[33]; /* Flawfinder: ignore */
486 strcpy(md5_hash_string, "00000000000000000000000000000000"); /* Flawfinder: ignore */ 486 strcpy(md5_hash_string, "00000000000000000000000000000000"); /* Flawfinder: ignore */
487 if (fOut) 487 if (fOut)
488 { 488 {
489 if (fwrite(data, 1, data_size, fOut) != data_size) 489 if (fwrite(data, 1, data_size, fOut) != data_size)
490 { 490 {
491 llwarns << "Short write" << llendl; 491 LL_WARNS("Messaging") << "Short write" << LL_ENDL;
492 } 492 }
493 fseek(fOut, 0, SEEK_SET); 493 fseek(fOut, 0, SEEK_SET);
494 fclose(fOut); 494 fclose(fOut);
@@ -504,7 +504,7 @@ void exported_j2c_complete(const LLTSCode status, void *user_data)
504 ++current_image_count; 504 ++current_image_count;
505 if (current_image_count == exported_image_count && current_object_count == exported_object_count) 505 if (current_image_count == exported_image_count && current_object_count == exported_object_count)
506 { 506 {
507 llinfos << "*** Export textures complete ***" << llendl; 507 LL_INFOS("Messaging") << "*** Export textures complete ***" << LL_ENDL;
508 export_complete(); 508 export_complete();
509 } 509 }
510 else 510 else
@@ -533,7 +533,7 @@ void process_places_reply(LLMessageSystem* msg, void** data)
533 } 533 }
534 else 534 else
535 { 535 {
536 llwarns << "Got invalid PlacesReply message" << llendl; 536 LL_WARNS("Messaging") << "Got invalid PlacesReply message" << LL_ENDL;
537 } 537 }
538} 538}
539 539
@@ -705,7 +705,7 @@ public:
705 virtual ~LLDiscardAgentOffer() {} 705 virtual ~LLDiscardAgentOffer() {}
706 virtual void done() 706 virtual void done()
707 { 707 {
708 lldebugs << "LLDiscardAgentOffer::done()" << llendl; 708 LL_DEBUGS("Messaging") << "LLDiscardAgentOffer::done()" << LL_ENDL;
709 LLUUID trash_id; 709 LLUUID trash_id;
710 trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH); 710 trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
711 bool notify = false; 711 bool notify = false;
@@ -729,9 +729,9 @@ public:
729 } 729 }
730 else 730 else
731 { 731 {
732 llwarns << "DiscardAgentOffer unable to find: " 732 LL_WARNS("Messaging") << "DiscardAgentOffer unable to find: "
733 << (trash_id.isNull() ? "trash " : "") 733 << (trash_id.isNull() ? "trash " : "")
734 << (mObjectID.isNull() ? "object" : "") << llendl; 734 << (mObjectID.isNull() ? "object" : "") << LL_ENDL;
735 } 735 }
736 gInventory.removeObserver(this); 736 gInventory.removeObserver(this);
737 if(notify) 737 if(notify)
@@ -766,14 +766,14 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
766 766
767 if(gThrottleTimer.checkExpirationAndReset(OFFER_THROTTLE_TIME)) 767 if(gThrottleTimer.checkExpirationAndReset(OFFER_THROTTLE_TIME))
768 { 768 {
769 //llinfos << "Throttle Expired" << llendl; 769 LL_DEBUGS("Messaging") << "Throttle Expired" << LL_ENDL;
770 throttle_count=1; 770 throttle_count=1;
771 throttle_logged=false; 771 throttle_logged=false;
772 return true; 772 return true;
773 } 773 }
774 else //has not expired 774 else //has not expired
775 { 775 {
776 //llinfos << "Throttle Not Expired, Count: " << throttle_count << llendl; 776 LL_DEBUGS("Messaging") << "Throttle Not Expired, Count: " << throttle_count << LL_ENDL;
777 // When downloading the initial inventory we get a lot of new items 777 // When downloading the initial inventory we get a lot of new items
778 // coming in and can't tell that from spam. JC 778 // coming in and can't tell that from spam. JC
779 if (LLStartUp::getStartupState() >= STATE_STARTED 779 if (LLStartUp::getStartupState() >= STATE_STARTED
@@ -821,7 +821,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
821 item = gInventory.getItem(*it); 821 item = gInventory.getItem(*it);
822 if(!item) 822 if(!item)
823 { 823 {
824 llwarns << "Unable to show inventory item: " << *it << llendl; 824 LL_WARNS("Messaging") << "Unable to show inventory item: " << *it << LL_ENDL;
825 continue; 825 continue;
826 } 826 }
827 if(gInventory.isObjectDescendentOf(*it, trash_id)) 827 if(gInventory.isObjectDescendentOf(*it, trash_id))
@@ -880,7 +880,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
880 //don't dick with highlight while the user is working 880 //don't dick with highlight while the user is working
881 //if(inventory_has_focus && !user_is_away) 881 //if(inventory_has_focus && !user_is_away)
882 // break; 882 // break;
883 //llinfos << "Highlighting" << item->getUUID() << llendl; 883 LL_DEBUGS("Messaging") << "Highlighting" << item->getUUID() << LL_ENDL;
884 //highlight item 884 //highlight item
885 885
886 LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus(); 886 LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus();
@@ -1041,8 +1041,8 @@ void inventory_offer_callback(S32 button, void* user_data)
1041 } 1041 }
1042 1042
1043 // we will want to open this item when it comes back. 1043 // we will want to open this item when it comes back.
1044 lldebugs << "Initializing an opener for tid: " << info->mTransactionID 1044 LL_DEBUGS("Messaging") << "Initializing an opener for tid: " << info->mTransactionID
1045 << llendl; 1045 << LL_ENDL;
1046 switch (info->mIM) 1046 switch (info->mIM)
1047 { 1047 {
1048 case IM_INVENTORY_OFFERED: 1048 case IM_INVENTORY_OFFERED:
@@ -1075,7 +1075,7 @@ void inventory_offer_callback(S32 button, void* user_data)
1075 } 1075 }
1076 break; 1076 break;
1077 default: 1077 default:
1078 llwarns << "inventory_offer_callback: unknown offer type" << llendl; 1078 LL_WARNS("Messaging") << "inventory_offer_callback: unknown offer type" << LL_ENDL;
1079 break; 1079 break;
1080 } // end switch (info->mIM) 1080 } // end switch (info->mIM)
1081 break; 1081 break;
@@ -1187,11 +1187,11 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1187 } 1187 }
1188 else 1188 else
1189 { 1189 {
1190 llwarns << "LLAssetType::lookupHumanReadable() returned NULL - probably bad asset type: " << info->mType << llendl; 1190 LL_WARNS("Messaging") << "LLAssetType::lookupHumanReadable() returned NULL - probably bad asset type: " << info->mType << LL_ENDL;
1191 args["[OBJECTTYPE]"] = ""; 1191 args["[OBJECTTYPE]"] = "";
1192 1192
1193 // This seems safest, rather than propagating bogosity 1193 // This seems safest, rather than propagating bogosity
1194 llwarns << "Forcing an inventory-decline for probably-bad asset type." << llendl; 1194 LL_WARNS("Messaging") << "Forcing an inventory-decline for probably-bad asset type." << LL_ENDL;
1195 inventory_offer_callback(IOR_DECLINE, info); 1195 inventory_offer_callback(IOR_DECLINE, info);
1196 return; 1196 return;
1197 } 1197 }
@@ -1278,10 +1278,6 @@ void lure_callback(S32 option, void* user_data)
1278 case 0: 1278 case 0:
1279 { 1279 {
1280 // accept 1280 // accept
1281 send_simple_im(info->mFromID,
1282 "",
1283 IM_LURE_ACCEPTED,
1284 info->mLureID);
1285 gAgent.teleportViaLure(info->mLureID, info->mGodlike); 1281 gAgent.teleportViaLure(info->mLureID, info->mGodlike);
1286 } 1282 }
1287 break; 1283 break;
@@ -1426,9 +1422,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1426 1422
1427 // now store incoming IM in chat history 1423 // now store incoming IM in chat history
1428 1424
1429 snprintf(buffer, sizeof(buffer), "%s%s%s", name, separator_string, (message+message_offset)); /* Flawfinder: ignore */ 1425 snprintf(buffer, sizeof(buffer), "%s%s", separator_string, (message+message_offset)); /* Flawfinder: ignore */
1430 1426
1431 llinfos << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << llendl; 1427 LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
1432 1428
1433 // add to IM panel, but do not bother the user 1429 // add to IM panel, but do not bother the user
1434 gIMMgr->addMessage( 1430 gIMMgr->addMessage(
@@ -1440,7 +1436,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1440 dialog, 1436 dialog,
1441 parent_estate_id, 1437 parent_estate_id,
1442 region_id, 1438 region_id,
1443 position); 1439 position,
1440 true);
1444 1441
1445 // pretend this is chat generated by self, so it does not show up on screen 1442 // pretend this is chat generated by self, so it does not show up on screen
1446 snprintf(buffer, sizeof(buffer), "IM: %s%s%s", name, separator_string, (message+message_offset)); /* Flawfinder: ignore */ 1443 snprintf(buffer, sizeof(buffer), "IM: %s%s%s", name, separator_string, (message+message_offset)); /* Flawfinder: ignore */
@@ -1481,9 +1478,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1481 snprintf(saved, MAX_STRING, "(Saved %s) ", /* Flawfinder: ignore */ 1478 snprintf(saved, MAX_STRING, "(Saved %s) ", /* Flawfinder: ignore */
1482 formatted_time(timestamp, time_buf)); 1479 formatted_time(timestamp, time_buf));
1483 } 1480 }
1484 snprintf(buffer, sizeof(buffer), "%s%s%s%s", name, separator_string, saved,(message+message_offset)); /* Flawfinder: ignore */ 1481 snprintf(buffer, sizeof(buffer), "%s%s%s", separator_string, saved,(message+message_offset)); /* Flawfinder: ignore */
1485 1482
1486 llinfos << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << llendl; 1483 LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
1487 1484
1488 if (!is_muted || is_linden) 1485 if (!is_muted || is_linden)
1489 { 1486 {
@@ -1496,7 +1493,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1496 dialog, 1493 dialog,
1497 parent_estate_id, 1494 parent_estate_id,
1498 region_id, 1495 region_id,
1499 position); 1496 position,
1497 true);
1500 snprintf(buffer, sizeof(buffer), "IM: %s%s%s%s", name, separator_string, saved, (message+message_offset)); /* Flawfinder: ignore */ 1498 snprintf(buffer, sizeof(buffer), "IM: %s%s%s%s", name, separator_string, saved, (message+message_offset)); /* Flawfinder: ignore */
1501 1499
1502 chat.mText = buffer; 1500 chat.mText = buffer;
@@ -1540,7 +1538,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1540 case IM_GROUP_NOTICE: 1538 case IM_GROUP_NOTICE:
1541 case IM_GROUP_NOTICE_REQUESTED: 1539 case IM_GROUP_NOTICE_REQUESTED:
1542 { 1540 {
1543 llinfos << "Received IM_GROUP_NOTICE message." << llendl; 1541 LL_INFOS("Messaging") << "Received IM_GROUP_NOTICE message." << LL_ENDL;
1544 // Read the binary bucket for more information. 1542 // Read the binary bucket for more information.
1545 struct notice_bucket_header_t 1543 struct notice_bucket_header_t
1546 { 1544 {
@@ -1559,7 +1557,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1559 if ( (binary_bucket_size < (S32)((sizeof(notice_bucket_header_t) + sizeof(U8)))) 1557 if ( (binary_bucket_size < (S32)((sizeof(notice_bucket_header_t) + sizeof(U8))))
1560 || (binary_bucket[binary_bucket_size - 1] != '\0') ) 1558 || (binary_bucket[binary_bucket_size - 1] != '\0') )
1561 { 1559 {
1562 llwarns << "Malformed group notice binary bucket" << llendl; 1560 LL_WARNS("Messaging") << "Malformed group notice binary bucket" << LL_ENDL;
1563 break; 1561 break;
1564 } 1562 }
1565 1563
@@ -1625,7 +1623,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1625 } 1623 }
1626 else 1624 else
1627 { 1625 {
1628 llinfos << "Received IM_GROUP_INVITATION message." << llendl; 1626 LL_INFOS("Messaging") << "Received IM_GROUP_INVITATION message." << LL_ENDL;
1629 // Read the binary bucket for more information. 1627 // Read the binary bucket for more information.
1630 struct invite_bucket_t 1628 struct invite_bucket_t
1631 { 1629 {
@@ -1636,7 +1634,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1636 // Make sure the binary bucket is the correct size. 1634 // Make sure the binary bucket is the correct size.
1637 if (binary_bucket_size != sizeof(invite_bucket_t)) 1635 if (binary_bucket_size != sizeof(invite_bucket_t))
1638 { 1636 {
1639 llwarns << "Malformed group invite binary bucket" << llendl; 1637 LL_WARNS("Messaging") << "Malformed group invite binary bucket" << LL_ENDL;
1640 break; 1638 break;
1641 } 1639 }
1642 1640
@@ -1675,7 +1673,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1675 1673
1676 if (sizeof(offer_agent_bucket_t) != binary_bucket_size) 1674 if (sizeof(offer_agent_bucket_t) != binary_bucket_size)
1677 { 1675 {
1678 llwarns << "Malformed inventory offer from agent" << llendl; 1676 LL_WARNS("Messaging") << "Malformed inventory offer from agent" << LL_ENDL;
1679 break; 1677 break;
1680 } 1678 }
1681 bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0]; 1679 bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0];
@@ -1686,7 +1684,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1686 { 1684 {
1687 if (sizeof(S8) != binary_bucket_size) 1685 if (sizeof(S8) != binary_bucket_size)
1688 { 1686 {
1689 llwarns << "Malformed inventory offer from object" << llendl; 1687 LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL;
1690 break; 1688 break;
1691 } 1689 }
1692 info->mType = (LLAssetType::EType) binary_bucket[0]; 1690 info->mType = (LLAssetType::EType) binary_bucket[0];
@@ -1747,7 +1745,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1747 1745
1748 case IM_GROUP_ELECTION_DEPRECATED: 1746 case IM_GROUP_ELECTION_DEPRECATED:
1749 { 1747 {
1750 llwarns << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << llendl; 1748 LL_WARNS("Messaging") << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << LL_ENDL;
1751 } 1749 }
1752 break; 1750 break;
1753 1751
@@ -1776,7 +1774,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1776 "(Saved %s) ", 1774 "(Saved %s) ",
1777 formatted_time(timestamp, time_buf)); 1775 formatted_time(timestamp, time_buf));
1778 } 1776 }
1779 snprintf(buffer, sizeof(buffer), "%s%s%s%s", name, separator_string, saved, (message+message_offset)); /* Flawfinder: ignore */ 1777 snprintf(buffer, sizeof(buffer), "%s%s%s", separator_string, saved, (message+message_offset)); /* Flawfinder: ignore */
1780 BOOL is_this_agent = FALSE; 1778 BOOL is_this_agent = FALSE;
1781 if(from_id == gAgentID) 1779 if(from_id == gAgentID)
1782 { 1780 {
@@ -1791,7 +1789,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1791 IM_SESSION_INVITE, 1789 IM_SESSION_INVITE,
1792 parent_estate_id, 1790 parent_estate_id,
1793 region_id, 1791 region_id,
1794 position); 1792 position,
1793 true);
1795 1794
1796 snprintf(buffer, sizeof(buffer), "IM: %s%s%s%s", name, separator_string, saved, (message+message_offset)); /* Flawfinder: ignore */ 1795 snprintf(buffer, sizeof(buffer), "IM: %s%s%s%s", name, separator_string, saved, (message+message_offset)); /* Flawfinder: ignore */
1797 chat.mText = buffer; 1796 chat.mText = buffer;
@@ -1826,7 +1825,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1826 case IM_BUSY_AUTO_RESPONSE: 1825 case IM_BUSY_AUTO_RESPONSE:
1827 if (is_muted) 1826 if (is_muted)
1828 { 1827 {
1829 lldebugs << "Ignoring busy response from " << from_id << llendl; 1828 LL_DEBUGS("Messaging") << "Ignoring busy response from " << from_id << LL_ENDL;
1830 return; 1829 return;
1831 } 1830 }
1832 else 1831 else
@@ -1874,16 +1873,16 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1874 // URLs sent by scripts (i.e. llLoadURL) 1873 // URLs sent by scripts (i.e. llLoadURL)
1875 if (binary_bucket_size <= 0) 1874 if (binary_bucket_size <= 0)
1876 { 1875 {
1877 llwarns << "bad binary_bucket_size: " 1876 LL_WARNS("Messaging") << "bad binary_bucket_size: "
1878 << binary_bucket_size 1877 << binary_bucket_size
1879 << " - aborting function." << llendl; 1878 << " - aborting function." << LL_ENDL;
1880 return; 1879 return;
1881 } 1880 }
1882 1881
1883 char* url = new char[binary_bucket_size]; 1882 char* url = new char[binary_bucket_size];
1884 if (url == NULL) 1883 if (url == NULL)
1885 { 1884 {
1886 llerrs << "Memory Allocation failed" << llendl; 1885 LL_ERRS("Messaging") << "Memory Allocation failed" << LL_ENDL;
1887 return; 1886 return;
1888 } 1887 }
1889 1888
@@ -1944,8 +1943,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1944 break; 1943 break;
1945 1944
1946 default: 1945 default:
1947 llwarns << "Instant message calling for unknown dialog " 1946 LL_WARNS("Messaging") << "Instant message calling for unknown dialog "
1948 << (S32)dialog << llendl; 1947 << (S32)dialog << LL_ENDL;
1949 break; 1948 break;
1950 } 1949 }
1951 1950
@@ -1960,6 +1959,8 @@ void busy_message (LLMessageSystem* msg, LLUUID from_id)
1960{ 1959{
1961 if (gAgent.getBusy()) 1960 if (gAgent.getBusy())
1962 { 1961 {
1962 std::string my_name;
1963 gAgent.buildFullname(my_name);
1963 LLString response = gSavedPerAccountSettings.getText("BusyModeResponse"); 1964 LLString response = gSavedPerAccountSettings.getText("BusyModeResponse");
1964 pack_instant_message( 1965 pack_instant_message(
1965 gMessageSystem, 1966 gMessageSystem,
@@ -1967,10 +1968,10 @@ void busy_message (LLMessageSystem* msg, LLUUID from_id)
1967 FALSE, 1968 FALSE,
1968 gAgent.getSessionID(), 1969 gAgent.getSessionID(),
1969 from_id, 1970 from_id,
1970 SYSTEM_FROM, 1971 my_name.c_str(),
1971 response.c_str(), 1972 response.c_str(),
1972 IM_ONLINE, 1973 IM_ONLINE,
1973 IM_CONSOLE_AND_CHAT_HISTORY); 1974 IM_BUSY_AUTO_RESPONSE);
1974 gAgent.sendReliableMessage(); 1975 gAgent.sendReliableMessage();
1975 } 1976 }
1976} 1977}
@@ -2071,7 +2072,7 @@ void callingcard_offer_callback(S32 option, void* user_data)
2071void process_offer_callingcard(LLMessageSystem* msg, void**) 2072void process_offer_callingcard(LLMessageSystem* msg, void**)
2072{ 2073{
2073 // someone has offered to form a friendship 2074 // someone has offered to form a friendship
2074 lldebugs << "callingcard offer" << llendl; 2075 LL_DEBUGS("Messaging") << "callingcard offer" << LL_ENDL;
2075 2076
2076 LLUUID source_id; 2077 LLUUID source_id;
2077 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, source_id); 2078 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, source_id);
@@ -2116,7 +2117,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**)
2116 } 2117 }
2117 else 2118 else
2118 { 2119 {
2119 llwarns << "Calling card offer from an unknown source." << llendl; 2120 LL_WARNS("Messaging") << "Calling card offer from an unknown source." << LL_ENDL;
2120 } 2121 }
2121 2122
2122 delete offerdata; // !=NULL if we didn't give ownership away 2123 delete offerdata; // !=NULL if we didn't give ownership away
@@ -2309,10 +2310,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2309 break; 2310 break;
2310 case CHAT_TYPE_START: 2311 case CHAT_TYPE_START:
2311 case CHAT_TYPE_STOP: 2312 case CHAT_TYPE_STOP:
2312 llwarns << "Got chat type start/stop in main chat processing." << llendl; 2313 LL_WARNS("Messaging") << "Got chat type start/stop in main chat processing." << LL_ENDL;
2313 break; 2314 break;
2314 default: 2315 default:
2315 llwarns << "Unknown type " << chat.mChatType << " in chat!" << llendl; 2316 LL_WARNS("Messaging") << "Unknown type " << chat.mChatType << " in chat!" << LL_ENDL;
2316 verb = " say, "; 2317 verb = " say, ";
2317 break; 2318 break;
2318 } 2319 }
@@ -2405,7 +2406,7 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
2405 if((gAgent.getID() != agent_id) 2406 if((gAgent.getID() != agent_id)
2406 || (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE)) 2407 || (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE))
2407 { 2408 {
2408 llwarns << "Unexpected teleport progress message." << llendl; 2409 LL_WARNS("Messaging") << "Unexpected teleport progress message." << LL_ENDL;
2409 return; 2410 return;
2410 } 2411 }
2411 U32 teleport_flags = 0x0; 2412 U32 teleport_flags = 0x0;
@@ -2420,7 +2421,7 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
2420 } 2421 }
2421 char buffer[MAX_STRING]; /* Flawfinder: ignore */ 2422 char buffer[MAX_STRING]; /* Flawfinder: ignore */
2422 msg->getString("Info", "Message", MAX_STRING, buffer); 2423 msg->getString("Info", "Message", MAX_STRING, buffer);
2423 lldebugs << "teleport progress: " << buffer << llendl; 2424 LL_DEBUGS("Messaging") << "teleport progress: " << buffer << LL_ENDL;
2424 2425
2425 //Sorta hacky...default to using simulator raw messages 2426 //Sorta hacky...default to using simulator raw messages
2426 //if we don't find the coresponding mapping in our progress mappings 2427 //if we don't find the coresponding mapping in our progress mappings
@@ -2544,12 +2545,12 @@ BOOL LLPostTeleportNotifiers::tick()
2544// We're going to pretend to be a new agent 2545// We're going to pretend to be a new agent
2545void process_teleport_finish(LLMessageSystem* msg, void**) 2546void process_teleport_finish(LLMessageSystem* msg, void**)
2546{ 2547{
2547 //llinfos << "Got teleport location message" << llendl; 2548 LL_DEBUGS("Messaging") << "Got teleport location message" << LL_ENDL;
2548 LLUUID agent_id; 2549 LLUUID agent_id;
2549 msg->getUUIDFast(_PREHASH_Info, _PREHASH_AgentID, agent_id); 2550 msg->getUUIDFast(_PREHASH_Info, _PREHASH_AgentID, agent_id);
2550 if (agent_id != gAgent.getID()) 2551 if (agent_id != gAgent.getID())
2551 { 2552 {
2552 llwarns << "Got teleport notification for wrong agent!" << llendl; 2553 LL_WARNS("Messaging") << "Got teleport notification for wrong agent!" << LL_ENDL;
2553 return; 2554 return;
2554 } 2555 }
2555 2556
@@ -2617,8 +2618,8 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
2617*/ 2618*/
2618 2619
2619 // now, use the circuit info to tell simulator about us! 2620 // now, use the circuit info to tell simulator about us!
2620 llinfos << "process_teleport_finish() Enabling " 2621 LL_INFOS("Messaging") << "process_teleport_finish() Enabling "
2621 << sim_host << " with code " << msg->mOurCircuitCode << llendl; 2622 << sim_host << " with code " << msg->mOurCircuitCode << LL_ENDL;
2622 msg->newMessageFast(_PREHASH_UseCircuitCode); 2623 msg->newMessageFast(_PREHASH_UseCircuitCode);
2623 msg->nextBlockFast(_PREHASH_CircuitCode); 2624 msg->nextBlockFast(_PREHASH_CircuitCode);
2624 msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode()); 2625 msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode());
@@ -2679,12 +2680,12 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
2679 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id); 2680 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id);
2680 if((gAgent.getID() != agent_id) || (gAgent.getSessionID() != session_id)) 2681 if((gAgent.getID() != agent_id) || (gAgent.getSessionID() != session_id))
2681 { 2682 {
2682 llwarns << "Incorrect id in process_agent_movement_complete()" 2683 LL_WARNS("Messaging") << "Incorrect id in process_agent_movement_complete()"
2683 << llendl; 2684 << LL_ENDL;
2684 return; 2685 return;
2685 } 2686 }
2686 2687
2687 llinfos << "process_agent_movement_complete()" << llendl; 2688 LL_DEBUGS("Messaging") << "process_agent_movement_complete()" << LL_ENDL;
2688 2689
2689 // *TODO: check timestamp to make sure the movement compleation 2690 // *TODO: check timestamp to make sure the movement compleation
2690 // makes sense. 2691 // makes sense.
@@ -2703,7 +2704,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
2703 { 2704 {
2704 // Could happen if you were immediately god-teleported away on login, 2705 // Could happen if you were immediately god-teleported away on login,
2705 // maybe other cases. Continue, but warn. JC 2706 // maybe other cases. Continue, but warn. JC
2706 llwarns << "agent_movement_complete() with NULL avatarp." << llendl; 2707 LL_WARNS("Messaging") << "agent_movement_complete() with NULL avatarp." << LL_ENDL;
2707 } 2708 }
2708 2709
2709 F32 x, y; 2710 F32 x, y;
@@ -2713,19 +2714,19 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
2713 { 2714 {
2714 if (gAgent.getRegion()) 2715 if (gAgent.getRegion())
2715 { 2716 {
2716 llwarns << "current region " << gAgent.getRegion()->getOriginGlobal() << llendl; 2717 LL_WARNS("Messaging") << "current region " << gAgent.getRegion()->getOriginGlobal() << LL_ENDL;
2717 } 2718 }
2718 2719
2719 llwarns << "Agent being sent to invalid home region: " 2720 LL_WARNS("Messaging") << "Agent being sent to invalid home region: "
2720 << x << ":" << y 2721 << x << ":" << y
2721 << " current pos " << gAgent.getPositionGlobal() 2722 << " current pos " << gAgent.getPositionGlobal()
2722 << llendl; 2723 << LL_ENDL;
2723 LLAppViewer::instance()->forceDisconnect("You were sent to an invalid region."); 2724 LLAppViewer::instance()->forceDisconnect("You were sent to an invalid region.");
2724 return; 2725 return;
2725 2726
2726 } 2727 }
2727 2728
2728 llinfos << "Changing home region to " << x << ":" << y << llendl; 2729 LL_INFOS("Messaging") << "Changing home region to " << x << ":" << y << LL_ENDL;
2729 2730
2730 // set our upstream host the new simulator and shuffle things as 2731 // set our upstream host the new simulator and shuffle things as
2731 // appropriate. 2732 // appropriate.
@@ -2845,11 +2846,11 @@ void process_crossed_region(LLMessageSystem* msg, void**)
2845 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id); 2846 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id);
2846 if((gAgent.getID() != agent_id) || (gAgent.getSessionID() != session_id)) 2847 if((gAgent.getID() != agent_id) || (gAgent.getSessionID() != session_id))
2847 { 2848 {
2848 llwarns << "Incorrect id in process_crossed_region()" 2849 LL_WARNS("Messaging") << "Incorrect id in process_crossed_region()"
2849 << llendl; 2850 << LL_ENDL;
2850 return; 2851 return;
2851 } 2852 }
2852 llinfos << "process_crossed_region()" << llendl; 2853 LL_INFOS("Messaging") << "process_crossed_region()" << LL_ENDL;
2853 2854
2854 U32 sim_ip; 2855 U32 sim_ip;
2855 msg->getIPAddrFast(_PREHASH_RegionData, _PREHASH_SimIP, sim_ip); 2856 msg->getIPAddrFast(_PREHASH_RegionData, _PREHASH_SimIP, sim_ip);
@@ -2977,24 +2978,24 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
2977/* 2978/*
2978 if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) 2979 if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT)
2979 { 2980 {
2980 //llinfos << "head rot " << head_rotation << llendl; 2981 //LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL;
2981 llinfos << "head_rot_chg = " << head_rot_chg << llendl; 2982 LL_INFOS("Messaging") << "head_rot_chg = " << head_rot_chg << LL_ENDL;
2982 } 2983 }
2983 if (cam_rot_chg.magVec() > ROTATION_THRESHOLD) 2984 if (cam_rot_chg.magVec() > ROTATION_THRESHOLD)
2984 { 2985 {
2985 llinfos << "cam rot " << cam_rot_chg.magVec() << llendl; 2986 LL_INFOS("Messaging") << "cam rot " << cam_rot_chg.magVec() << LL_ENDL;
2986 } 2987 }
2987 if (cam_center_chg.magVec() > TRANSLATE_THRESHOLD) 2988 if (cam_center_chg.magVec() > TRANSLATE_THRESHOLD)
2988 { 2989 {
2989 llinfos << "cam center " << cam_center_chg.magVec() << llendl; 2990 LL_INFOS("Messaging") << "cam center " << cam_center_chg.magVec() << LL_ENDL;
2990 } 2991 }
2991// if (drag_delta_chg.magVec() > TRANSLATE_THRESHOLD) 2992// if (drag_delta_chg.magVec() > TRANSLATE_THRESHOLD)
2992// { 2993// {
2993// llinfos << "drag delta " << drag_delta_chg.magVec() << llendl; 2994// LL_INFOS("Messaging") << "drag delta " << drag_delta_chg.magVec() << LL_ENDL;
2994// } 2995// }
2995 if (control_flag_change) 2996 if (control_flag_change)
2996 { 2997 {
2997 llinfos << "dcf = " << control_flag_change << llendl; 2998 LL_INFOS("Messaging") << "dcf = " << control_flag_change << LL_ENDL;
2998 } 2999 }
2999*/ 3000*/
3000 3001
@@ -3043,7 +3044,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
3043 3044
3044// if (camera_pos_agent.mV[VY] > 255.f) 3045// if (camera_pos_agent.mV[VY] > 255.f)
3045// { 3046// {
3046// llinfos << "Sending camera center " << camera_pos_agent << llendl; 3047// LL_INFOS("Messaging") << "Sending camera center " << camera_pos_agent << LL_ENDL;
3047// } 3048// }
3048 3049
3049 msg->addVector3Fast(_PREHASH_CameraCenter, camera_pos_agent); 3050 msg->addVector3Fast(_PREHASH_CameraCenter, camera_pos_agent);
@@ -3058,12 +3059,12 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
3058 { 3059 {
3059 if (control_flags & AGENT_CONTROL_LBUTTON_DOWN) 3060 if (control_flags & AGENT_CONTROL_LBUTTON_DOWN)
3060 { 3061 {
3061 llinfos << "AgentUpdate left button down" << llendl; 3062 LL_INFOS("Messaging") << "AgentUpdate left button down" << LL_ENDL;
3062 } 3063 }
3063 3064
3064 if (control_flags & AGENT_CONTROL_LBUTTON_UP) 3065 if (control_flags & AGENT_CONTROL_LBUTTON_UP)
3065 { 3066 {
3066 llinfos << "AgentUpdate left button up" << llendl; 3067 LL_INFOS("Messaging") << "AgentUpdate left button up" << LL_ENDL;
3067 } 3068 }
3068 } 3069 }
3069 3070
@@ -3078,7 +3079,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
3078 gAgent.sendReliableMessage(); 3079 gAgent.sendReliableMessage();
3079 } 3080 }
3080 3081
3081 //llinfos << "agent " << avatar_pos_agent << " cam " << camera_pos_agent << llendl; 3082// LL_DEBUGS("Messaging") << "agent " << avatar_pos_agent << " cam " << camera_pos_agent << LL_ENDL;
3082 3083
3083 // Copy the old data 3084 // Copy the old data
3084 last_head_rot = head_rotation; 3085 last_head_rot = head_rotation;
@@ -3191,13 +3192,13 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
3191 gMessageSystem->getSenderPort()); 3192 gMessageSystem->getSenderPort());
3192 if (id == LLUUID::null) 3193 if (id == LLUUID::null)
3193 { 3194 {
3194 //llinfos << "Unknown kill for local " << local_id << llendl; 3195 LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL;
3195 gObjectList.mNumUnknownKills++; 3196 gObjectList.mNumUnknownKills++;
3196 continue; 3197 continue;
3197 } 3198 }
3198 else 3199 else
3199 { 3200 {
3200 //llinfos << "Kill message for local " << local_id << llendl; 3201 LL_DEBUGS("Messaging") << "Kill message for local " << local_id << LL_ENDL;
3201 } 3202 }
3202 3203
3203 LLSelectMgr::getInstance()->removeObjectFromSelections(id); 3204 LLSelectMgr::getInstance()->removeObjectFromSelections(id);
@@ -3227,7 +3228,7 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
3227 } 3228 }
3228 else 3229 else
3229 { 3230 {
3230 llwarns << "Object in UUID lookup, but not on object list in kill!" << llendl; 3231 LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL;
3231 gObjectList.mNumUnknownKills++; 3232 gObjectList.mNumUnknownKills++;
3232 } 3233 }
3233 } 3234 }
@@ -3256,8 +3257,8 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
3256 3257
3257 LLWorld::getInstance()->setSpaceTimeUSec(space_time_usec); 3258 LLWorld::getInstance()->setSpaceTimeUSec(space_time_usec);
3258 3259
3259 //lldebugs << "time_synch() - " << sun_direction << ", " << sun_ang_velocity 3260 //LL_DEBUGS("Messaging") << "time_synch() - " << sun_direction << ", " << sun_ang_velocity
3260 // << ", " << phase << llendl; 3261 // << ", " << phase << LL_ENDL;
3261 3262
3262 gSky.setSunPhase(phase); 3263 gSky.setSunPhase(phase);
3263 gSky.setSunTargetDirection(sun_direction, sun_ang_velocity); 3264 gSky.setSunTargetDirection(sun_direction, sun_ang_velocity);
@@ -3509,7 +3510,8 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
3509 LLViewerStats::getInstance()->mPhysicsMemoryAllocated.addValue(stat_value); 3510 LLViewerStats::getInstance()->mPhysicsMemoryAllocated.addValue(stat_value);
3510 break; 3511 break;
3511 default: 3512 default:
3512// llwarns << "Unknown stat id" << stat_id << llendl; 3513 // Used to be a commented out warning.
3514 LL_DEBUGS("Messaging") << "Unknown stat id" << stat_id << LL_ENDL;
3513 break; 3515 break;
3514 } 3516 }
3515 } 3517 }
@@ -3576,7 +3578,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
3576 if (!avatarp) 3578 if (!avatarp)
3577 { 3579 {
3578 // no agent by this ID...error? 3580 // no agent by this ID...error?
3579 llwarns << "Received animation state for unknown avatar" << uuid << llendl; 3581 LL_WARNS("Messaging") << "Received animation state for unknown avatar" << uuid << LL_ENDL;
3580 return; 3582 return;
3581 } 3583 }
3582 3584
@@ -3594,7 +3596,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
3594 mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); 3596 mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i);
3595 mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); 3597 mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i);
3596 3598
3597 //llinfos << "Anim sequence ID: " << anim_sequence_id << llendl; 3599 LL_DEBUGS("Messaging") << "Anim sequence ID: " << anim_sequence_id << LL_ENDL;
3598 3600
3599 avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; 3601 avatarp->mSignaledAnimations[animation_id] = anim_sequence_id;
3600 3602
@@ -3654,7 +3656,7 @@ void process_avatar_appearance(LLMessageSystem *mesgsys, void **user_data)
3654 } 3656 }
3655 else 3657 else
3656 { 3658 {
3657 llwarns << "avatar_appearance sent for unknown avatar " << uuid << llendl; 3659 LL_WARNS("Messaging") << "avatar_appearance sent for unknown avatar " << uuid << LL_ENDL;
3658 } 3660 }
3659} 3661}
3660 3662
@@ -3720,7 +3722,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
3720 } 3722 }
3721 else 3723 else
3722 { 3724 {
3723 llwarns << "Received sit approval for unknown object " << sitObjectID << llendl; 3725 LL_WARNS("Messaging") << "Received sit approval for unknown object " << sitObjectID << LL_ENDL;
3724 } 3726 }
3725} 3727}
3726 3728
@@ -3870,13 +3872,13 @@ void process_name_value(LLMessageSystem *mesgsys, void **user_data)
3870 for (i = 0; i < num_blocks; i++) 3872 for (i = 0; i < num_blocks; i++)
3871 { 3873 {
3872 mesgsys->getStringFast(_PREHASH_NameValueData, _PREHASH_NVPair, NAME_VALUE_BUF_SIZE, temp_str, i); 3874 mesgsys->getStringFast(_PREHASH_NameValueData, _PREHASH_NVPair, NAME_VALUE_BUF_SIZE, temp_str, i);
3873 llinfos << "Added to object Name Value: " << temp_str << llendl; 3875 LL_INFOS("Messaging") << "Added to object Name Value: " << temp_str << LL_ENDL;
3874 object->addNVPair(temp_str); 3876 object->addNVPair(temp_str);
3875 } 3877 }
3876 } 3878 }
3877 else 3879 else
3878 { 3880 {
3879 llinfos << "Can't find object " << id << " to add name value pair" << llendl; 3881 LL_INFOS("Messaging") << "Can't find object " << id << " to add name value pair" << LL_ENDL;
3880 } 3882 }
3881} 3883}
3882 3884
@@ -3896,13 +3898,13 @@ void process_remove_name_value(LLMessageSystem *mesgsys, void **user_data)
3896 for (i = 0; i < num_blocks; i++) 3898 for (i = 0; i < num_blocks; i++)
3897 { 3899 {
3898 mesgsys->getStringFast(_PREHASH_NameValueData, _PREHASH_NVPair, NAME_VALUE_BUF_SIZE, temp_str, i); 3900 mesgsys->getStringFast(_PREHASH_NameValueData, _PREHASH_NVPair, NAME_VALUE_BUF_SIZE, temp_str, i);
3899 llinfos << "Removed from object Name Value: " << temp_str << llendl; 3901 LL_INFOS("Messaging") << "Removed from object Name Value: " << temp_str << LL_ENDL;
3900 object->removeNVPair(temp_str); 3902 object->removeNVPair(temp_str);
3901 } 3903 }
3902 } 3904 }
3903 else 3905 else
3904 { 3906 {
3905 llinfos << "Can't find object " << id << " to remove name value pair" << llendl; 3907 LL_INFOS("Messaging") << "Can't find object " << id << " to remove name value pair" << LL_ENDL;
3906 } 3908 }
3907} 3909}
3908 3910
@@ -3982,8 +3984,8 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
3982 msg->getS32("MoneyData", "SquareMetersCredit", credit); 3984 msg->getS32("MoneyData", "SquareMetersCredit", credit);
3983 msg->getS32("MoneyData", "SquareMetersCommitted", committed); 3985 msg->getS32("MoneyData", "SquareMetersCommitted", committed);
3984 msg->getStringFast(_PREHASH_MoneyData, _PREHASH_Description, STD_STRING_BUF_SIZE, desc); 3986 msg->getStringFast(_PREHASH_MoneyData, _PREHASH_Description, STD_STRING_BUF_SIZE, desc);
3985 llinfos << "L$, credit, committed: " << balance << " " << credit << " " 3987 LL_INFOS("Messaging") << "L$, credit, committed: " << balance << " " << credit << " "
3986 << committed << llendl; 3988 << committed << LL_ENDL;
3987 3989
3988 if (gStatusBar) 3990 if (gStatusBar)
3989 { 3991 {
@@ -4027,10 +4029,10 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
4027 const S32 POP_FRONT_SIZE = 12; 4029 const S32 POP_FRONT_SIZE = 12;
4028 if(recent.size() > MAX_LOOKBACK) 4030 if(recent.size() > MAX_LOOKBACK)
4029 { 4031 {
4030 lldebugs << "Removing oldest transaction records" << llendl; 4032 LL_DEBUGS("Messaging") << "Removing oldest transaction records" << LL_ENDL;
4031 recent.erase(recent.begin(), recent.begin() + POP_FRONT_SIZE); 4033 recent.erase(recent.begin(), recent.begin() + POP_FRONT_SIZE);
4032 } 4034 }
4033 //lldebugs << "Pushing back transaction " << tid << llendl; 4035 //LL_DEBUGS("Messaging") << "Pushing back transaction " << tid << LL_ENDL;
4034 recent.push_back(tid); 4036 recent.push_back(tid);
4035 } 4037 }
4036} 4038}
@@ -4475,9 +4477,9 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
4475 switch (question_throttle.noteAction(throttle_owner_name)) 4477 switch (question_throttle.noteAction(throttle_owner_name))
4476 { 4478 {
4477 case LLStringThrottle::THROTTLE_NEWLY_BLOCKED: 4479 case LLStringThrottle::THROTTLE_NEWLY_BLOCKED:
4478 llinfos << "process_script_question throttled" 4480 LL_INFOS("Messaging") << "process_script_question throttled"
4479 << " owner_name:" << owner_name 4481 << " owner_name:" << owner_name
4480 << llendl; 4482 << LL_ENDL;
4481 // Fall through 4483 // Fall through
4482 4484
4483 case LLStringThrottle::THROTTLE_BLOCKED: 4485 case LLStringThrottle::THROTTLE_BLOCKED:
@@ -4539,7 +4541,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
4539 4541
4540void process_derez_container(LLMessageSystem *msg, void**) 4542void process_derez_container(LLMessageSystem *msg, void**)
4541{ 4543{
4542 llwarns << "call to deprecated process_derez_container" << llendl; 4544 LL_WARNS("Messaging") << "call to deprecated process_derez_container" << LL_ENDL;
4543} 4545}
4544 4546
4545void container_inventory_arrived(LLViewerObject* object, 4547void container_inventory_arrived(LLViewerObject* object,
@@ -4547,7 +4549,7 @@ void container_inventory_arrived(LLViewerObject* object,
4547 S32 serial_num, 4549 S32 serial_num,
4548 void* data) 4550 void* data)
4549{ 4551{
4550 llinfos << "container_inventory_arrived()" << llendl; 4552 LL_DEBUGS("Messaging") << "container_inventory_arrived()" << LL_ENDL;
4551 if( gAgent.cameraMouselook() ) 4553 if( gAgent.cameraMouselook() )
4552 { 4554 {
4553 gAgent.changeCameraToDefault(); 4555 gAgent.changeCameraToDefault();
@@ -4693,7 +4695,7 @@ void process_teleport_local(LLMessageSystem *msg,void**)
4693 msg->getUUIDFast(_PREHASH_Info, _PREHASH_AgentID, agent_id); 4695 msg->getUUIDFast(_PREHASH_Info, _PREHASH_AgentID, agent_id);
4694 if (agent_id != gAgent.getID()) 4696 if (agent_id != gAgent.getID())
4695 { 4697 {
4696 llwarns << "Got teleport notification for wrong agent!" << llendl; 4698 LL_WARNS("Messaging") << "Got teleport notification for wrong agent!" << LL_ENDL;
4697 return; 4699 return;
4698 } 4700 }
4699 4701
@@ -4923,8 +4925,8 @@ void process_user_info_reply(LLMessageSystem* msg, void**)
4923 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); 4925 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
4924 if(agent_id != gAgent.getID()) 4926 if(agent_id != gAgent.getID())
4925 { 4927 {
4926 llwarns << "process_user_info_reply - " 4928 LL_WARNS("Messaging") << "process_user_info_reply - "
4927 << "wrong agent id." << llendl; 4929 << "wrong agent id." << LL_ENDL;
4928 } 4930 }
4929 4931
4930 BOOL im_via_email; 4932 BOOL im_via_email;
@@ -5132,7 +5134,7 @@ void process_load_url(LLMessageSystem* msg, void**)
5132 if (LLMuteList::getInstance()->isMuted(infop->mObjectID, infop->mObjectName) || 5134 if (LLMuteList::getInstance()->isMuted(infop->mObjectID, infop->mObjectName) ||
5133 LLMuteList::getInstance()->isMuted(infop->mOwnerID)) 5135 LLMuteList::getInstance()->isMuted(infop->mOwnerID))
5134 { 5136 {
5135 llinfos<<"Ignoring load_url from muted object/owner."<<llendl; 5137 LL_INFOS("Messaging")<<"Ignoring load_url from muted object/owner."<<LL_ENDL;
5136 delete infop; 5138 delete infop;
5137 infop = NULL; 5139 infop = NULL;
5138 return; 5140 return;
@@ -5161,7 +5163,7 @@ void process_initiate_download(LLMessageSystem* msg, void**)
5161 msg->getUUID("AgentData", "AgentID", agent_id); 5163 msg->getUUID("AgentData", "AgentID", agent_id);
5162 if (agent_id != gAgent.getID()) 5164 if (agent_id != gAgent.getID())
5163 { 5165 {
5164 llwarns << "Initiate download for wrong agent" << llendl; 5166 LL_WARNS("Messaging") << "Initiate download for wrong agent" << LL_ENDL;
5165 return; 5167 return;
5166 } 5168 }
5167 5169
@@ -5192,10 +5194,12 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)
5192 msg->getVector3("Data", "SimPosition", pos); 5194 msg->getVector3("Data", "SimPosition", pos);
5193 msg->getVector3("Data", "LookAt", look_at); 5195 msg->getVector3("Data", "LookAt", look_at);
5194 5196
5195 // gFloaterWorldMap->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); 5197 gFloaterWorldMap->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);
5196 // LLFloaterWorldMap::show(NULL, TRUE); 5198 LLFloaterWorldMap::show(NULL, TRUE);
5197 5199
5198 LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE); 5200 // remove above two lines and replace with below line
5201 // to re-enable parcel browser for llMapDestination()
5202 // LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE);
5199 5203
5200} 5204}
5201 5205
@@ -5287,7 +5291,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
5287 LLAssetType::EType type, 5291 LLAssetType::EType type,
5288 void* user_data, S32 status, LLExtStat ext_status) 5292 void* user_data, S32 status, LLExtStat ext_status)
5289{ 5293{
5290 llinfos << "onCovenantLoadComplete()" << llendl; 5294 LL_DEBUGS("Messaging") << "onCovenantLoadComplete()" << LL_ENDL;
5291 std::string covenant_text; 5295 std::string covenant_text;
5292 if(0 == status) 5296 if(0 == status)
5293 { 5297 {
@@ -5298,7 +5302,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
5298 char* buffer = new char[file_length+1]; 5302 char* buffer = new char[file_length+1];
5299 if (buffer == NULL) 5303 if (buffer == NULL)
5300 { 5304 {
5301 llerrs << "Memory Allocation failed" << llendl; 5305 LL_ERRS("Messaging") << "Memory Allocation failed" << LL_ENDL;
5302 return; 5306 return;
5303 } 5307 }
5304 5308
@@ -5315,7 +5319,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
5315 file_length+1); 5319 file_length+1);
5316 if( !editor->importBuffer( buffer ) ) 5320 if( !editor->importBuffer( buffer ) )
5317 { 5321 {
5318 llwarns << "Problem importing estate covenant." << llendl; 5322 LL_WARNS("Messaging") << "Problem importing estate covenant." << LL_ENDL;
5319 covenant_text = "Problem importing estate covenant."; 5323 covenant_text = "Problem importing estate covenant.";
5320 } 5324 }
5321 else 5325 else
@@ -5328,7 +5332,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
5328 } 5332 }
5329 else 5333 else
5330 { 5334 {
5331 llwarns << "Problem importing estate covenant: Covenant file format error." << llendl; 5335 LL_WARNS("Messaging") << "Problem importing estate covenant: Covenant file format error." << LL_ENDL;
5332 covenant_text = "Problem importing estate covenant: Covenant file format error."; 5336 covenant_text = "Problem importing estate covenant: Covenant file format error.";
5333 } 5337 }
5334 } 5338 }
@@ -5350,7 +5354,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
5350 covenant_text = "Unable to load estate covenant at this time."; 5354 covenant_text = "Unable to load estate covenant at this time.";
5351 } 5355 }
5352 5356
5353 llwarns << "Problem loading notecard: " << status << llendl; 5357 LL_WARNS("Messaging") << "Problem loading notecard: " << status << LL_ENDL;
5354 } 5358 }
5355 LLPanelEstateCovenant::updateCovenantText(covenant_text, asset_uuid); 5359 LLPanelEstateCovenant::updateCovenantText(covenant_text, asset_uuid);
5356 LLPanelLandCovenant::updateCovenantText(covenant_text); 5360 LLPanelLandCovenant::updateCovenantText(covenant_text);
@@ -5368,7 +5372,7 @@ void process_feature_disabled_message(LLMessageSystem* msg, void**)
5368 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_AgentID,agentID); 5372 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_AgentID,agentID);
5369 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_TransactionID,transactionID); 5373 msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_TransactionID,transactionID);
5370 5374
5371 llwarns << "Blacklisted Feature Response:" << &messageText[0] << llendl; 5375 LL_WARNS("Messaging") << "Blacklisted Feature Response:" << &messageText[0] << LL_ENDL;
5372} 5376}
5373 5377
5374// ------------------------------------------------------------ 5378// ------------------------------------------------------------