diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-02-17 15:26:20 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-02-17 15:32:51 +0100 |
commit | 23b3cf9d10b8e999c46238631239005f2367a5f9 (patch) | |
tree | 80108137c3922024f5f7779ae5436ada4b803a23 /src/qt/qtipcserver.cpp | |
parent | 39231e91052bff032525d99dbe890f742b6180fe (diff) |
Restructure IPC URL handling (fixes #851)
Diffstat (limited to 'src/qt/qtipcserver.cpp')
-rw-r--r-- | src/qt/qtipcserver.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/qt/qtipcserver.cpp b/src/qt/qtipcserver.cpp index 90d5c14211..018461a9b2 100644 --- a/src/qt/qtipcserver.cpp +++ b/src/qt/qtipcserver.cpp @@ -30,16 +30,7 @@ void ipcThread(void* parg) ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(100); if(mq->timed_receive(&strBuf, sizeof(strBuf), nSize, nPriority, d)) { - strBuf[nSize] = '\0'; - // Convert bitcoin:// URLs to bitcoin: URIs - if (strBuf[8] == '/' && strBuf[9] == '/') - { - for (int i = 8; i < 256; i++) - { - strBuf[i] = strBuf[i+2]; - } - } - ThreadSafeHandleURL(strBuf); + ThreadSafeHandleURL(std::string(strBuf, nSize)); Sleep(1000); } if (fShutdown) @@ -66,16 +57,7 @@ void ipcInit() ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(1); if(mq->timed_receive(&strBuf, sizeof(strBuf), nSize, nPriority, d)) { - strBuf[nSize] = '\0'; - // Convert bitcoin:// URLs to bitcoin: URIs - if (strBuf[8] == '/' && strBuf[9] == '/') - { - for (int i = 8; i < 256; i++) - { - strBuf[i] = strBuf[i+2]; - } - } - ThreadSafeHandleURL(strBuf); + ThreadSafeHandleURL(std::string(strBuf, nSize)); } else break; |