[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/LocalConnection.cpp
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/LocalConnection.cpp |
Date: |
Mon, 21 Apr 2008 18:30:21 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Benjamin Wolsey <bwy> 08/04/21 18:30:20
Modified files:
. : ChangeLog
server/asobj : LocalConnection.cpp
Log message:
* server/asobj/LocalConnection.cpp: log unimplemented message
only
once, drop c_str() where appropriate and other minor cleanups.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6339&r2=1.6340
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/LocalConnection.cpp?cvsroot=gnash&r1=1.24&r2=1.25
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6339
retrieving revision 1.6340
diff -u -b -r1.6339 -r1.6340
--- ChangeLog 21 Apr 2008 16:39:15 -0000 1.6339
+++ ChangeLog 21 Apr 2008 18:30:19 -0000 1.6340
@@ -1,3 +1,8 @@
+2008-04-21 Benjamin Wolsey <address@hidden>
+
+ * server/asobj/LocalConnection.cpp: log unimplemented message only
+ once, drop c_str() where appropriate and other minor cleanups.
+
2008-04-21 Sandro Santilli <address@hidden>
* server/parser/button_character_def.cpp (readDefineButton2):
Index: server/asobj/LocalConnection.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/LocalConnection.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- server/asobj/LocalConnection.cpp 19 Apr 2008 19:23:51 -0000 1.24
+++ server/asobj/LocalConnection.cpp 21 Apr 2008 18:30:20 -0000 1.25
@@ -37,7 +37,6 @@
#include "amf.h"
#include "lcshm.h"
-using namespace std;
using namespace amf;
// http://www.osflash.org/localconnection
@@ -127,14 +126,14 @@
_name = name;
}
- log_debug("trying to open shared memory segment: \"%s\"", _name.c_str());
+ log_debug("trying to open shared memory segment: \"%s\"", _name);
if (Shm::attach(_name.c_str(), true) == false) {
return false;
}
if (Shm::getAddr() <= 0) {
- log_error("Failed to open shared memory segment: \"%s\"",
_name.c_str());
+ log_error("Failed to open shared memory segment: \"%s\"", _name);
return false;
}
@@ -161,7 +160,7 @@
}
URL url(getVM().getSWFUrl());
-// log_debug(_("ORIG URL=%s (%s)"), url.str().c_str(),
url.hostname().c_str());
+// log_debug(_("ORIG URL=%s (%s)"), url.str(), url.hostname());
if (url.hostname().empty()) {
_name = "localhost";
} else {
@@ -172,11 +171,11 @@
// was removed. For v7 or later. the full hostname is returned. The
localhost
// is always just the localhost.
if (version <= 6) {
- string::size_type pos;
+ std::string::size_type pos;
pos = _name.rfind(".", _name.size());
- if (pos != string::npos) {
+ if (pos != std::string::npos) {
pos = _name.rfind(".", pos-1);
- if (pos != string::npos) {
+ if (pos != std::string::npos) {
_name = _name.substr(pos+1, _name.size());
}
}
@@ -187,7 +186,7 @@
_name = "localhost";
}
- log_debug("The domain for this host is: %s", _name.c_str());
+ log_debug("The domain for this host is: %s", _name);
return _name;
}
@@ -225,9 +224,11 @@
{
GNASH_REPORT_FUNCTION;
// log_debug("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs);
- bool ret;
boost::intrusive_ptr<LocalConnection> ptr =
ensureType<LocalConnection>(fn.this_ptr);
- string name = fn.arg(0).to_string().c_str();
+
+ std::string name = fn.arg(0).to_string();
+ bool ret;
+
if (fn.nargs != 0) {
ret = ptr->connect(name);
name = "localhost";
@@ -245,10 +246,11 @@
{
GNASH_REPORT_FUNCTION;
boost::intrusive_ptr<LocalConnection> ptr =
ensureType<LocalConnection>(fn.this_ptr);
+
VM& vm = ptr->getVM();
- int swfVersion = vm.getSWFVersion();
+ const int swfVersion = vm.getSWFVersion();
- return as_value(ptr->domain(swfVersion).c_str());
+ return as_value(ptr->domain(swfVersion));
}
// \brief The callback for LocalConnection::send()
@@ -258,7 +260,7 @@
GNASH_REPORT_FUNCTION;
boost::intrusive_ptr<LocalConnection> ptr =
ensureType<LocalConnection>(fn.this_ptr);
- log_unimpl(_("LocalConnection.send unimplemented"));
+ LOG_ONCE(log_unimpl(_("LocalConnection.send unimplemented")));
if (!ptr->connected()) {
ptr->connect();