Revision: 41433
http://brlcad.svn.sourceforge.net/brlcad/?rev=41433&view=rev
Author: davidloman
Date: 2010-11-23 15:20:33 +0000 (Tue, 23 Nov 2010)
Log Message:
-----------
Cleaned up some logger calls.
Modified Paths:
--------------
rt^3/trunk/src/libNet/Portal.cxx
Modified: rt^3/trunk/src/libNet/Portal.cxx
===================================================================
--- rt^3/trunk/src/libNet/Portal.cxx 2010-11-23 06:22:57 UTC (rev 41432)
+++ rt^3/trunk/src/libNet/Portal.cxx 2010-11-23 15:20:33 UTC (rev 41433)
@@ -51,11 +51,11 @@
Portal::send(NetMsg* msg) {
QByteArray* ba = msg->serialize();
-// QString s("Sending msg. Type: ");
-// s.append(QString::number(msg->getMsgType()));
-// s.append(" len: ");
-// s.append(QString::number(ba->size()));
-// log->logDEBUG("Portal", s);
+ QString s("Sending msg. Type: ");
+ s.append(QString::number(msg->getMsgType()));
+ s.append(" len: ");
+ s.append(QString::number(ba->size()));
+ log->logDEBUG("Portal", s);
int retval = this->pkgClient->send(PKG_MAGIC2, ba->data(), ba->size());
@@ -93,14 +93,6 @@
Portal::read() {
int retval = 0;
- /*
- const pkg_switch* table = this->pkgClient->getCallBackTable();
- pkg_switch sw = table[0];
- bu_log("P(1.1): Route[0] type: %d\n", sw.pks_type);
- bu_log("P(1.1): Route[0] callback: %d\n", sw.pks_handler);
- bu_log("P(1.1): Route[0] user_data: %d\n", sw.pks_user_data);
- */
-
//recv first
retval = this->pkgClient->processData();
if (retval < 0) {
@@ -168,6 +160,8 @@
void
Portal::callbackSpringboard(struct pkg_conn* conn, char* buf) {
+ Logger* log = Logger::getInstance();
+
/* Check to see if we got a good Buffer and Portal Object */
if (buf == 0) {
bu_bomb("pkg callback returned a NULL buffer!\n");
@@ -178,14 +172,14 @@
QByteArray ba(buf, len);
if (conn->pkc_user_data == 0) {
- bu_log("pkg callback returned a NULL user_data pointer!\n");
-
+ log->logERROR("Portal", "pkg callback returned a NULL user_data
pointer!");
+ return;
}
Portal* p = (Portal*) conn->pkc_user_data;
if (p == 0) {
- bu_log("WARNING! NULL Portal.\n");
+ log->logERROR("Portal", "WARNING! NULL Portal.");
}
/* Build a NetMsg */
@@ -193,7 +187,7 @@
/* check to see if we deserialized the msg properly */
if (msg == 0) {
- bu_log("WARNING! NetMsg failed to deserialize properly.\n");
+ log->logERROR("Portal", "WARNING! NetMsg failed to deserialize
properly.\n");
return;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits