diff options
Diffstat (limited to 'linden/indra/newview/llcompilequeue.cpp')
-rw-r--r-- | linden/indra/newview/llcompilequeue.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/linden/indra/newview/llcompilequeue.cpp b/linden/indra/newview/llcompilequeue.cpp index c5ad2b9..12b52c4 100644 --- a/linden/indra/newview/llcompilequeue.cpp +++ b/linden/indra/newview/llcompilequeue.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 5 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -198,7 +199,7 @@ BOOL LLFloaterScriptQueue::start() | |||
198 | { | 199 | { |
199 | //llinfos << "LLFloaterCompileQueue::start()" << llendl; | 200 | //llinfos << "LLFloaterCompileQueue::start()" << llendl; |
200 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ | 201 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ |
201 | snprintf(buffer, sizeof(buffer), "Starting %s of %d items.", mStartString, mObjectIDs.count()); /*Flawfinder: ignore*/ | 202 | snprintf(buffer, sizeof(buffer), "Starting %s of %d items.", mStartString, mObjectIDs.count()); /* Flawfinder: ignore */ |
202 | 203 | ||
203 | LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); | 204 | LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); |
204 | list->addSimpleItem(buffer); | 205 | list->addSimpleItem(buffer); |
@@ -238,7 +239,7 @@ BOOL LLFloaterScriptQueue::nextObject() | |||
238 | 239 | ||
239 | mDone = TRUE; | 240 | mDone = TRUE; |
240 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ | 241 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ |
241 | snprintf(buffer, sizeof(buffer), "Done."); /*Flawfinder: ignore*/ | 242 | snprintf(buffer, sizeof(buffer), "Done."); /* Flawfinder: ignore */ |
242 | list->addSimpleItem(buffer); | 243 | list->addSimpleItem(buffer); |
243 | childSetEnabled("close",TRUE); | 244 | childSetEnabled("close",TRUE); |
244 | } | 245 | } |
@@ -383,7 +384,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, | |||
383 | LLVFile file(vfs, asset_id, type); | 384 | LLVFile file(vfs, asset_id, type); |
384 | char uuid_str[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ | 385 | char uuid_str[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ |
385 | asset_id.toString(uuid_str); | 386 | asset_id.toString(uuid_str); |
386 | snprintf(filename, sizeof(filename), "%s.%s",gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_str).c_str(),LLAssetType::lookup(type)); /*Flawfinder: ignore*/ | 387 | snprintf(filename, sizeof(filename), "%s.%s",gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_str).c_str(),LLAssetType::lookup(type)); /* Flawfinder: ignore */ |
387 | 388 | ||
388 | FILE *fp = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/ | 389 | FILE *fp = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/ |
389 | if (fp) | 390 | if (fp) |
@@ -403,7 +404,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, | |||
403 | } | 404 | } |
404 | 405 | ||
405 | // It's now in the file, now compile it. | 406 | // It's now in the file, now compile it. |
406 | snprintf(buffer, sizeof(buffer), "Downloaded, now compiling '%s'.", data->mScriptName.c_str()); /*Flawfinder: ignore*/ | 407 | snprintf(buffer, sizeof(buffer), "Downloaded, now compiling '%s'.", data->mScriptName.c_str()); /* Flawfinder: ignore */ |
407 | queue->compile(filename, asset_id); | 408 | queue->compile(filename, asset_id); |
408 | 409 | ||
409 | // Delete it after we're done compiling? | 410 | // Delete it after we're done compiling? |
@@ -420,19 +421,19 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, | |||
420 | { | 421 | { |
421 | LLChat chat("Script not found on server."); | 422 | LLChat chat("Script not found on server."); |
422 | LLFloaterChat::addChat(chat); | 423 | LLFloaterChat::addChat(chat); |
423 | snprintf(buffer, sizeof(buffer), "Problem downloading %s.", /*Flawfinder: ignore*/ | 424 | snprintf(buffer, sizeof(buffer), "Problem downloading %s.", /* Flawfinder: ignore */ |
424 | data->mScriptName.c_str()); | 425 | data->mScriptName.c_str()); |
425 | } | 426 | } |
426 | else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) | 427 | else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) |
427 | { | 428 | { |
428 | LLChat chat("Insufficient permissions to download a script."); | 429 | LLChat chat("Insufficient permissions to download a script."); |
429 | LLFloaterChat::addChat(chat); | 430 | LLFloaterChat::addChat(chat); |
430 | snprintf(buffer, sizeof(buffer), "Insufficient permissions for '%s'.", /*Flawfinder: ignore*/ | 431 | snprintf(buffer, sizeof(buffer), "Insufficient permissions for '%s'.", /* Flawfinder: ignore */ |
431 | data->mScriptName.c_str()); | 432 | data->mScriptName.c_str()); |
432 | } | 433 | } |
433 | else | 434 | else |
434 | { | 435 | { |
435 | snprintf(buffer, sizeof(buffer), "Unknown failure to download %s.", /*Flawfinder: ignore*/ | 436 | snprintf(buffer, sizeof(buffer), "Unknown failure to download %s.", /* Flawfinder: ignore */ |
436 | data->mScriptName.c_str()); | 437 | data->mScriptName.c_str()); |
437 | } | 438 | } |
438 | 439 | ||
@@ -496,9 +497,9 @@ void LLFloaterCompileQueue::compile(const char* filename, | |||
496 | char uuid_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ | 497 | char uuid_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ |
497 | new_asset_id.toString(uuid_string); | 498 | new_asset_id.toString(uuid_string); |
498 | char dst_filename[LL_MAX_PATH]; /*Flawfinder: ignore*/ | 499 | char dst_filename[LL_MAX_PATH]; /*Flawfinder: ignore*/ |
499 | snprintf(dst_filename, sizeof(dst_filename), "%s.lso", gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string).c_str()); /*Flawfinder: ignore*/ | 500 | snprintf(dst_filename, sizeof(dst_filename), "%s.lso", gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string).c_str()); /* Flawfinder: ignore */ |
500 | char err_filename[LL_MAX_PATH]; /*Flawfinder: ignore*/ | 501 | char err_filename[LL_MAX_PATH]; /*Flawfinder: ignore*/ |
501 | snprintf(err_filename, sizeof(err_filename), "%s.out", gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string).c_str()); /*Flawfinder: ignore*/ | 502 | snprintf(err_filename, sizeof(err_filename), "%s.out", gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string).c_str()); /* Flawfinder: ignore */ |
502 | 503 | ||
503 | gAssetStorage->storeAssetData(filename, tid, | 504 | gAssetStorage->storeAssetData(filename, tid, |
504 | LLAssetType::AT_LSL_TEXT, | 505 | LLAssetType::AT_LSL_TEXT, |
@@ -622,7 +623,7 @@ void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj, | |||
622 | LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); | 623 | LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); |
623 | LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); | 624 | LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); |
624 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ | 625 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ |
625 | snprintf(buffer, sizeof(buffer), "Resetting '%s'.", item->getName().c_str()); /*Flawfinder: ignore*/ | 626 | snprintf(buffer, sizeof(buffer), "Resetting '%s'.", item->getName().c_str()); /* Flawfinder: ignore */ |
626 | list->addSimpleItem(buffer); | 627 | list->addSimpleItem(buffer); |
627 | LLMessageSystem* msg = gMessageSystem; | 628 | LLMessageSystem* msg = gMessageSystem; |
628 | msg->newMessageFast(_PREHASH_ScriptReset); | 629 | msg->newMessageFast(_PREHASH_ScriptReset); |
@@ -685,7 +686,7 @@ void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj, | |||
685 | LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); | 686 | LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); |
686 | LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); | 687 | LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); |
687 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ | 688 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ |
688 | snprintf(buffer, sizeof(buffer), "Running '%s'.", item->getName().c_str()); /*Flawfinder: ignore*/ | 689 | snprintf(buffer, sizeof(buffer), "Running '%s'.", item->getName().c_str()); /* Flawfinder: ignore */ |
689 | list->addSimpleItem(buffer); | 690 | list->addSimpleItem(buffer); |
690 | 691 | ||
691 | LLMessageSystem* msg = gMessageSystem; | 692 | LLMessageSystem* msg = gMessageSystem; |
@@ -750,7 +751,7 @@ void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj, | |||
750 | LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); | 751 | LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); |
751 | LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); | 752 | LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); |
752 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ | 753 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ |
753 | snprintf(buffer, sizeof(buffer), "Not running '%s'.", item->getName().c_str()); /*Flawfinder: ignore*/ | 754 | snprintf(buffer, sizeof(buffer), "Not running '%s'.", item->getName().c_str()); /* Flawfinder: ignore */ |
754 | list->addSimpleItem(buffer); | 755 | list->addSimpleItem(buffer); |
755 | 756 | ||
756 | LLMessageSystem* msg = gMessageSystem; | 757 | LLMessageSystem* msg = gMessageSystem; |