Browse Source

修复mac间无法发送文件的问题

master
chenyong 8 years ago
parent
commit
efdce0a5e9
3 changed files with 10 additions and 4 deletions
  1. +7
    -2
      feiqlib/feiqengine.cpp
  2. +2
    -1
      feiqlib/filetask.cpp
  3. +1
    -1
      feiqlib/ipmsg.h

+ 7
- 2
feiqlib/feiqengine.cpp View File

@@ -69,7 +69,9 @@ public:
<<sep
<<content->modifyTime
<<sep
<<content->fileType;
<<content->fileType
<<sep
<<FILELIST_SEPARATOR;
}
};

@@ -332,9 +334,11 @@ public:
break;

auto content = createFileContent(found, endTask);
content->packetNo = stoul(post->packetNo);
if (content != nullptr)
{
content->packetNo = stoul(post->packetNo);
post->contents.push_back(shared_ptr<Content>(std::move(content)));
}

found = ++endTask;
}
@@ -610,6 +614,7 @@ bool FeiqEngine::downloadFile(FileTask* task)
}

fclose(of);
task->setProcess(total);
task->setState(FileTaskState::Finish);
};



+ 2
- 1
feiqlib/filetask.cpp View File

@@ -22,7 +22,8 @@ void FileTask::setObserver(IFileTaskObserver *observer)
void FileTask::setProcess(int val)
{
mProcess = val;
if (mProcess - mLastProcess >= mNotifySize)
if (mProcess - mLastProcess >= mNotifySize
|| mProcess >= mContent->size)
{
mLastProcess = mProcess;
mObserver->onProgress(this);


+ 1
- 1
feiqlib/ipmsg.h View File

@@ -129,7 +129,7 @@
#define IPMSG_FILE_ALIASFNAME 0x00000040 // alias fname
#define IPMSG_FILE_UNICODEFNAME 0x00000041 // UNICODE fname

#define FILELIST_SEPARATOR 0x7
#define FILELIST_SEPARATOR (char)0x7
#define HOSTLIST_DUMMY (char)0x8
#define HLIST_ENTRY_SEPARATOR (char)0x3a



Loading…
Cancel
Save