From 28e01b8c6a137a9e98d95689be3d3d72be18d9d7 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Sun, 14 Jul 2002 19:08:08 +0000 Subject: - Non-KDE stuff now builds correctly with gcc3 --- ncpd/linkchan.cc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'ncpd/linkchan.cc') diff --git a/ncpd/linkchan.cc b/ncpd/linkchan.cc index 2d9a67e..9a45158 100644 --- a/ncpd/linkchan.cc +++ b/ncpd/linkchan.cc @@ -32,6 +32,9 @@ using namespace std; +extern ostream lout; +extern ostream lerr; + linkChan::linkChan(ncp * _ncpController, int _ncpChannel):channel(_ncpController) { registerSer = 0x1234; @@ -45,11 +48,11 @@ ncpDataCallback(bufferStore & a) { int len = a.getLen(); if (verbose & LINKCHAN_DEBUG_LOG) { - cout << "linkchan: << msg "; + lout << "linkchan: << msg "; if (verbose & LINKCHAN_DEBUG_DUMP) - cout << a << endl; + lout << a << endl; else - cout << len << endl; + lout << len << endl; } if ((len >= 5) && (a.getByte(0) == 1)) { @@ -63,16 +66,16 @@ ncpDataCallback(bufferStore & a) strncpy(srvName, a.getString(7), 17); if (verbose & LINKCHAN_DEBUG_LOG) - cout << "linkchan: received registerAck: ser=0x" << hex << setw(4) - << setfill(0) << ser << " res=" << res << " srvName=\"" + lout << "linkchan: received registerAck: ser=0x" << hex << setw(4) + << setfill('0') << ser << " res=" << res << " srvName=\"" << srvName << "\"" << endl; while (!registerStack.empty()) { se = registerStack.pop(); if (se.getWord(0) == ser) { if (verbose & LINKCHAN_DEBUG_LOG) - cout << "linkchan: found ser=0x" << hex << setw(4) << - setfill(0) << se.getWord(0) << + lout << "linkchan: found ser=0x" << hex << setw(4) << + setfill('0') << se.getWord(0) << " on stack -> callBack to waiting chan" << endl; if (strlen(srvName) < 4) strcat(srvName, ".*"); @@ -83,7 +86,7 @@ ncpDataCallback(bufferStore & a) registerStack = newStack; return; } - cerr << "linkchan: unknown message " << a.getByte(0) << endl; + lerr << "linkchan: unknown message " << a.getByte(0) << endl; } char *linkChan:: @@ -96,14 +99,14 @@ void linkChan:: ncpConnectAck() { if (verbose & LINKCHAN_DEBUG_LOG) - cout << "linkchan: << cack" << endl; + lout << "linkchan: << cack" << endl; } void linkChan:: ncpConnectTerminate() { if (verbose & LINKCHAN_DEBUG_LOG) - cout << "linkchan: << ctrm" << endl; + lout << "linkchan: << ctrm" << endl; terminateWhenAsked(); } -- cgit v1.2.3