diff options
Diffstat (limited to 'linden/indra/llmessage/llxfermanager.cpp')
-rw-r--r-- | linden/indra/llmessage/llxfermanager.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/linden/indra/llmessage/llxfermanager.cpp b/linden/indra/llmessage/llxfermanager.cpp index 8bf9813..90188b6 100644 --- a/linden/indra/llmessage/llxfermanager.cpp +++ b/linden/indra/llmessage/llxfermanager.cpp | |||
@@ -406,8 +406,8 @@ U64 LLXferManager::registerXfer(const void *datap, const S32 length) | |||
406 | 406 | ||
407 | /////////////////////////////////////////////////////////// | 407 | /////////////////////////////////////////////////////////// |
408 | 408 | ||
409 | void LLXferManager::requestFile(const char* local_filename, | 409 | void LLXferManager::requestFile(const std::string& local_filename, |
410 | const char* remote_filename, | 410 | const std::string& remote_filename, |
411 | ELLPath remote_path, | 411 | ELLPath remote_path, |
412 | const LLHost& remote_host, | 412 | const LLHost& remote_host, |
413 | BOOL delete_remote_on_completion, | 413 | BOOL delete_remote_on_completion, |
@@ -444,7 +444,7 @@ void LLXferManager::requestFile(const char* local_filename, | |||
444 | // Note: according to AaronB, this is here to deal with locks on files that were | 444 | // Note: according to AaronB, this is here to deal with locks on files that were |
445 | // in transit during a crash, | 445 | // in transit during a crash, |
446 | if(delete_remote_on_completion && | 446 | if(delete_remote_on_completion && |
447 | (strstr(remote_filename,".tmp") == &remote_filename[strlen(remote_filename)-4])) /* Flawfinder : ignore */ | 447 | (remote_filename.substr(remote_filename.length()-4) == ".tmp")) |
448 | { | 448 | { |
449 | LLFile::remove(local_filename); | 449 | LLFile::remove(local_filename); |
450 | } | 450 | } |
@@ -464,7 +464,7 @@ void LLXferManager::requestFile(const char* local_filename, | |||
464 | } | 464 | } |
465 | } | 465 | } |
466 | 466 | ||
467 | void LLXferManager::requestFile(const char* remote_filename, | 467 | void LLXferManager::requestFile(const std::string& remote_filename, |
468 | ELLPath remote_path, | 468 | ELLPath remote_path, |
469 | const LLHost& remote_host, | 469 | const LLHost& remote_host, |
470 | BOOL delete_remote_on_completion, | 470 | BOOL delete_remote_on_completion, |
@@ -540,7 +540,7 @@ void LLXferManager::requestVFile(const LLUUID& local_id, | |||
540 | 540 | ||
541 | /* | 541 | /* |
542 | void LLXferManager::requestXfer( | 542 | void LLXferManager::requestXfer( |
543 | const char *local_filename, | 543 | const std::string& local_filename, |
544 | BOOL delete_remote_on_completion, | 544 | BOOL delete_remote_on_completion, |
545 | U64 xfer_id, | 545 | U64 xfer_id, |
546 | const LLHost &remote_host, | 546 | const LLHost &remote_host, |
@@ -634,11 +634,11 @@ void LLXferManager::processReceiveData (LLMessageSystem *mesgsys, void ** /*user | |||
634 | // confirm it if it was a resend of the last one, since the confirmation might have gotten dropped | 634 | // confirm it if it was a resend of the last one, since the confirmation might have gotten dropped |
635 | if (decodePacketNum(packetnum) == (xferp->mPacketNum - 1)) | 635 | if (decodePacketNum(packetnum) == (xferp->mPacketNum - 1)) |
636 | { | 636 | { |
637 | llinfos << "Reconfirming xfer " << xferp->mRemoteHost << ":" << xferp->getName() << " packet " << packetnum << llendl; sendConfirmPacket(mesgsys, id, decodePacketNum(packetnum), mesgsys->getSender()); | 637 | llinfos << "Reconfirming xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " packet " << packetnum << llendl; sendConfirmPacket(mesgsys, id, decodePacketNum(packetnum), mesgsys->getSender()); |
638 | } | 638 | } |
639 | else | 639 | else |
640 | { | 640 | { |
641 | llinfos << "Ignoring xfer " << xferp->mRemoteHost << ":" << xferp->getName() << " recv'd packet " << packetnum << "; expecting " << xferp->mPacketNum << llendl; | 641 | llinfos << "Ignoring xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " recv'd packet " << packetnum << "; expecting " << xferp->mPacketNum << llendl; |
642 | } | 642 | } |
643 | return; | 643 | return; |
644 | } | 644 | } |
@@ -717,7 +717,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user | |||
717 | { | 717 | { |
718 | 718 | ||
719 | U64 id; | 719 | U64 id; |
720 | char local_filename[MAX_STRING]; /* Flawfinder : ignore */ | 720 | std::string local_filename; |
721 | ELLPath local_path = LL_PATH_NONE; | 721 | ELLPath local_path = LL_PATH_NONE; |
722 | S32 result = LL_ERR_NOERR; | 722 | S32 result = LL_ERR_NOERR; |
723 | LLUUID uuid; | 723 | LLUUID uuid; |
@@ -732,7 +732,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user | |||
732 | llinfos << "xfer request id: " << U64_to_str(id, U64_BUF, sizeof(U64_BUF)) | 732 | llinfos << "xfer request id: " << U64_to_str(id, U64_BUF, sizeof(U64_BUF)) |
733 | << " to " << mesgsys->getSender() << llendl; | 733 | << " to " << mesgsys->getSender() << llendl; |
734 | 734 | ||
735 | mesgsys->getStringFast(_PREHASH_XferID, _PREHASH_Filename, MAX_STRING, local_filename); | 735 | mesgsys->getStringFast(_PREHASH_XferID, _PREHASH_Filename, local_filename); |
736 | 736 | ||
737 | U8 local_path_u8; | 737 | U8 local_path_u8; |
738 | mesgsys->getU8("XferID", "FilePath", local_path_u8); | 738 | mesgsys->getU8("XferID", "FilePath", local_path_u8); |
@@ -780,7 +780,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user | |||
780 | llerrs << "Xfer allcoation error" << llendl; | 780 | llerrs << "Xfer allcoation error" << llendl; |
781 | } | 781 | } |
782 | } | 782 | } |
783 | else if (strlen(local_filename)) /* Flawfinder : ignore */ | 783 | else if (!local_filename.empty()) |
784 | { | 784 | { |
785 | std::string expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename ); | 785 | std::string expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename ); |
786 | llinfos << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << llendl; | 786 | llinfos << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << llendl; |
@@ -923,7 +923,7 @@ void LLXferManager::retransmitUnackedPackets () | |||
923 | { | 923 | { |
924 | if (xferp->mRetries > LL_PACKET_RETRY_LIMIT) | 924 | if (xferp->mRetries > LL_PACKET_RETRY_LIMIT) |
925 | { | 925 | { |
926 | llinfos << "dropping xfer " << xferp->mRemoteHost << ":" << xferp->getName() << " packet retransmit limit exceeded, xfer dropped" << llendl; | 926 | llinfos << "dropping xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " packet retransmit limit exceeded, xfer dropped" << llendl; |
927 | xferp->abort(LL_ERR_TCP_TIMEOUT); | 927 | xferp->abort(LL_ERR_TCP_TIMEOUT); |
928 | delp = xferp; | 928 | delp = xferp; |
929 | xferp = xferp->mNext; | 929 | xferp = xferp->mNext; |
@@ -931,7 +931,7 @@ void LLXferManager::retransmitUnackedPackets () | |||
931 | } | 931 | } |
932 | else | 932 | else |
933 | { | 933 | { |
934 | llinfos << "resending xfer " << xferp->mRemoteHost << ":" << xferp->getName() << " packet unconfirmed after: "<< et << " sec, packet " << xferp->mPacketNum << llendl; | 934 | llinfos << "resending xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " packet unconfirmed after: "<< et << " sec, packet " << xferp->mPacketNum << llendl; |
935 | xferp->resendLastPacket(); | 935 | xferp->resendLastPacket(); |
936 | xferp = xferp->mNext; | 936 | xferp = xferp->mNext; |
937 | } | 937 | } |
@@ -946,7 +946,7 @@ void LLXferManager::retransmitUnackedPackets () | |||
946 | } | 946 | } |
947 | else if (xferp->mStatus == e_LL_XFER_ABORTED) | 947 | else if (xferp->mStatus == e_LL_XFER_ABORTED) |
948 | { | 948 | { |
949 | llwarns << "Removing aborted xfer " << xferp->mRemoteHost << ":" << xferp->getName() << llendl; | 949 | llwarns << "Removing aborted xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << llendl; |
950 | delp = xferp; | 950 | delp = xferp; |
951 | xferp = xferp->mNext; | 951 | xferp = xferp->mNext; |
952 | removeXfer(delp,&mSendList); | 952 | removeXfer(delp,&mSendList); |