From 7be68c0e03961ef8da0e0fa9683ab83770b41d62 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Thu, 10 Apr 2003 22:07:44 +0000 Subject: some debug output --- (limited to 'noncore') diff --git a/noncore/net/mailit/smtpclient.cpp b/noncore/net/mailit/smtpclient.cpp index 3bdc072..6699a90 100644 --- a/noncore/net/mailit/smtpclient.cpp +++ b/noncore/net/mailit/smtpclient.cpp @@ -87,13 +87,15 @@ void SmtpClient::incomingData() return; response = socket->readLine(); - + qDebug(response); + switch(status) { case Init: { if (response[0] == '2') { status = From; mailPtr = mailList.first(); *stream << "HELO there\r\n"; + qDebug("HELO"); } else errorHandling(ErrUnknownResponse); break; } @@ -101,6 +103,7 @@ void SmtpClient::incomingData() if (response[0] == '2') { *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; status = Recv; + qDebug("MAIL FROM: "+mailPtr->from); } else errorHandling(ErrUnknownResponse); break; } @@ -110,6 +113,7 @@ void SmtpClient::incomingData() if (it == NULL) errorHandling(ErrUnknownResponse); *stream << "RCPT TO: <" << *it << ">\r\n"; + qDebug("RCPT TO: "+ *it); status = MRcv; } else errorHandling(ErrUnknownResponse); break; @@ -119,6 +123,7 @@ void SmtpClient::incomingData() it++; if ( it != mailPtr->to.end() ) { *stream << "RCPT TO: <" << *it << ">\r\n"; + qDebug("RCPT TO: "+ *it); break; } else { status = Data; @@ -129,6 +134,7 @@ void SmtpClient::incomingData() if (response[0] == '2') { *stream << "DATA\r\n"; status = Body; + qDebug("DATA"); emit updateStatus(tr("Sending: ") + mailPtr->subject); } else errorHandling(ErrUnknownResponse); break; @@ -142,6 +148,7 @@ void SmtpClient::incomingData() } else { status = Quit; } + qDebug("BODY"); } else errorHandling(ErrUnknownResponse); break; } @@ -156,6 +163,7 @@ void SmtpClient::incomingData() mailList.clear(); sending = FALSE; socket->close(); + qDebug("QUIT"); } else errorHandling(ErrUnknownResponse); break; } diff --git a/noncore/unsupported/mailit/smtpclient.cpp b/noncore/unsupported/mailit/smtpclient.cpp index 3bdc072..6699a90 100644 --- a/noncore/unsupported/mailit/smtpclient.cpp +++ b/noncore/unsupported/mailit/smtpclient.cpp @@ -87,13 +87,15 @@ void SmtpClient::incomingData() return; response = socket->readLine(); - + qDebug(response); + switch(status) { case Init: { if (response[0] == '2') { status = From; mailPtr = mailList.first(); *stream << "HELO there\r\n"; + qDebug("HELO"); } else errorHandling(ErrUnknownResponse); break; } @@ -101,6 +103,7 @@ void SmtpClient::incomingData() if (response[0] == '2') { *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; status = Recv; + qDebug("MAIL FROM: "+mailPtr->from); } else errorHandling(ErrUnknownResponse); break; } @@ -110,6 +113,7 @@ void SmtpClient::incomingData() if (it == NULL) errorHandling(ErrUnknownResponse); *stream << "RCPT TO: <" << *it << ">\r\n"; + qDebug("RCPT TO: "+ *it); status = MRcv; } else errorHandling(ErrUnknownResponse); break; @@ -119,6 +123,7 @@ void SmtpClient::incomingData() it++; if ( it != mailPtr->to.end() ) { *stream << "RCPT TO: <" << *it << ">\r\n"; + qDebug("RCPT TO: "+ *it); break; } else { status = Data; @@ -129,6 +134,7 @@ void SmtpClient::incomingData() if (response[0] == '2') { *stream << "DATA\r\n"; status = Body; + qDebug("DATA"); emit updateStatus(tr("Sending: ") + mailPtr->subject); } else errorHandling(ErrUnknownResponse); break; @@ -142,6 +148,7 @@ void SmtpClient::incomingData() } else { status = Quit; } + qDebug("BODY"); } else errorHandling(ErrUnknownResponse); break; } @@ -156,6 +163,7 @@ void SmtpClient::incomingData() mailList.clear(); sending = FALSE; socket->close(); + qDebug("QUIT"); } else errorHandling(ErrUnknownResponse); break; } -- cgit v0.9.0.2