[asterisk-scf-commits] asterisk-scf/integration/bridging.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Oct 14 12:37:15 CDT 2010
branch "master" has been updated
via 1874f709a83438fcc5471b081bd2a44b4949dd4d (commit)
from bc76adbe41d2553471a7a3ea108eb54a698c9481 (commit)
Summary of changes:
test/TestBridging.cpp | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 1874f709a83438fcc5471b081bd2a44b4949dd4d
Author: Brent Eagles <beagles at digium.com>
Date: Thu Oct 14 15:05:54 2010 -0230
Fix up a couple of portability/security issues.
diff --git a/test/TestBridging.cpp b/test/TestBridging.cpp
index 982edbd..aa60c65 100644
--- a/test/TestBridging.cpp
+++ b/test/TestBridging.cpp
@@ -40,12 +40,13 @@ public:
const char* fakeName = "BRIDGE_TEST_SERVICE";
mArgc = args.size() + 1;
mArgv = new char*[mArgc];
- mArgv[0] = new char[strlen(fakeName) + 1];
- strcpy(mArgv[0], fakeName);
+ size_t len = strlen(fakeName);
+ mArgv[0] = new char[len + 1];
+ strncpy(mArgv[0], fakeName, len);
for(size_t i = 1; i < mArgc; ++i)
{
mArgv[i] = new char[args[i].size() + 1];
- strcpy(mArgv[i], args[i].c_str());
+ strncpy(mArgv[i], args[i].c_str(), args[i].size());
}
}
@@ -437,15 +438,14 @@ public:
std::vector<std::string> log;
std::string idB = testEnv.communicator()->identityToString(b->ice_getIdentity());
sessions.push_back(b);
- sleep(5);
channel.commands()->getlog(idA, log);
dumplog(log);
b->start();
-
+ IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(2));
bridge->replaceSession(a, sessions);
log.clear();
channel.commands()->answer(idB);
- sleep(5);
+ IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(2));
channel.commands()->getlog(idB, log);
dumplog(log);
-----------------------------------------------------------------------
--
asterisk-scf/integration/bridging.git
More information about the asterisk-scf-commits
mailing list