summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-04-10 22:07:44 (UTC)
committer llornkcor <llornkcor>2003-04-10 22:07:44 (UTC)
commit7be68c0e03961ef8da0e0fa9683ab83770b41d62 (patch) (unidiff)
tree82a2756dc720622c90b1f8d2a2319525ebb4bb3b
parenta37444cf6a9b5a903124d63c8c742bb9dbf04069 (diff)
downloadopie-7be68c0e03961ef8da0e0fa9683ab83770b41d62.zip
opie-7be68c0e03961ef8da0e0fa9683ab83770b41d62.tar.gz
opie-7be68c0e03961ef8da0e0fa9683ab83770b41d62.tar.bz2
some debug output
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mailit/smtpclient.cpp10
-rw-r--r--noncore/unsupported/mailit/smtpclient.cpp10
2 files changed, 18 insertions, 2 deletions
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()
87 return; 87 return;
88 88
89 response = socket->readLine(); 89 response = socket->readLine();
90 90 qDebug(response);
91
91 switch(status) { 92 switch(status) {
92 case Init: { 93 case Init: {
93 if (response[0] == '2') { 94 if (response[0] == '2') {
94 status = From; 95 status = From;
95 mailPtr = mailList.first(); 96 mailPtr = mailList.first();
96 *stream << "HELO there\r\n"; 97 *stream << "HELO there\r\n";
98 qDebug("HELO");
97 } else errorHandling(ErrUnknownResponse); 99 } else errorHandling(ErrUnknownResponse);
98 break; 100 break;
99 } 101 }
@@ -101,6 +103,7 @@ void SmtpClient::incomingData()
101 if (response[0] == '2') { 103 if (response[0] == '2') {
102 *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; 104 *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n";
103 status = Recv; 105 status = Recv;
106 qDebug("MAIL FROM: "+mailPtr->from);
104 } else errorHandling(ErrUnknownResponse); 107 } else errorHandling(ErrUnknownResponse);
105 break; 108 break;
106 } 109 }
@@ -110,6 +113,7 @@ void SmtpClient::incomingData()
110 if (it == NULL) 113 if (it == NULL)
111 errorHandling(ErrUnknownResponse); 114 errorHandling(ErrUnknownResponse);
112 *stream << "RCPT TO: <" << *it << ">\r\n"; 115 *stream << "RCPT TO: <" << *it << ">\r\n";
116 qDebug("RCPT TO: "+ *it);
113 status = MRcv; 117 status = MRcv;
114 } else errorHandling(ErrUnknownResponse); 118 } else errorHandling(ErrUnknownResponse);
115 break; 119 break;
@@ -119,6 +123,7 @@ void SmtpClient::incomingData()
119 it++; 123 it++;
120 if ( it != mailPtr->to.end() ) { 124 if ( it != mailPtr->to.end() ) {
121 *stream << "RCPT TO: <" << *it << ">\r\n"; 125 *stream << "RCPT TO: <" << *it << ">\r\n";
126 qDebug("RCPT TO: "+ *it);
122 break; 127 break;
123 } else { 128 } else {
124 status = Data; 129 status = Data;
@@ -129,6 +134,7 @@ void SmtpClient::incomingData()
129 if (response[0] == '2') { 134 if (response[0] == '2') {
130 *stream << "DATA\r\n"; 135 *stream << "DATA\r\n";
131 status = Body; 136 status = Body;
137 qDebug("DATA");
132 emit updateStatus(tr("Sending: ") + mailPtr->subject); 138 emit updateStatus(tr("Sending: ") + mailPtr->subject);
133 } else errorHandling(ErrUnknownResponse); 139 } else errorHandling(ErrUnknownResponse);
134 break; 140 break;
@@ -142,6 +148,7 @@ void SmtpClient::incomingData()
142 } else { 148 } else {
143 status = Quit; 149 status = Quit;
144 } 150 }
151 qDebug("BODY");
145 } else errorHandling(ErrUnknownResponse); 152 } else errorHandling(ErrUnknownResponse);
146 break; 153 break;
147 } 154 }
@@ -156,6 +163,7 @@ void SmtpClient::incomingData()
156 mailList.clear(); 163 mailList.clear();
157 sending = FALSE; 164 sending = FALSE;
158 socket->close(); 165 socket->close();
166 qDebug("QUIT");
159 } else errorHandling(ErrUnknownResponse); 167 } else errorHandling(ErrUnknownResponse);
160 break; 168 break;
161 } 169 }
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()
87 return; 87 return;
88 88
89 response = socket->readLine(); 89 response = socket->readLine();
90 90 qDebug(response);
91
91 switch(status) { 92 switch(status) {
92 case Init: { 93 case Init: {
93 if (response[0] == '2') { 94 if (response[0] == '2') {
94 status = From; 95 status = From;
95 mailPtr = mailList.first(); 96 mailPtr = mailList.first();
96 *stream << "HELO there\r\n"; 97 *stream << "HELO there\r\n";
98 qDebug("HELO");
97 } else errorHandling(ErrUnknownResponse); 99 } else errorHandling(ErrUnknownResponse);
98 break; 100 break;
99 } 101 }
@@ -101,6 +103,7 @@ void SmtpClient::incomingData()
101 if (response[0] == '2') { 103 if (response[0] == '2') {
102 *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; 104 *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n";
103 status = Recv; 105 status = Recv;
106 qDebug("MAIL FROM: "+mailPtr->from);
104 } else errorHandling(ErrUnknownResponse); 107 } else errorHandling(ErrUnknownResponse);
105 break; 108 break;
106 } 109 }
@@ -110,6 +113,7 @@ void SmtpClient::incomingData()
110 if (it == NULL) 113 if (it == NULL)
111 errorHandling(ErrUnknownResponse); 114 errorHandling(ErrUnknownResponse);
112 *stream << "RCPT TO: <" << *it << ">\r\n"; 115 *stream << "RCPT TO: <" << *it << ">\r\n";
116 qDebug("RCPT TO: "+ *it);
113 status = MRcv; 117 status = MRcv;
114 } else errorHandling(ErrUnknownResponse); 118 } else errorHandling(ErrUnknownResponse);
115 break; 119 break;
@@ -119,6 +123,7 @@ void SmtpClient::incomingData()
119 it++; 123 it++;
120 if ( it != mailPtr->to.end() ) { 124 if ( it != mailPtr->to.end() ) {
121 *stream << "RCPT TO: <" << *it << ">\r\n"; 125 *stream << "RCPT TO: <" << *it << ">\r\n";
126 qDebug("RCPT TO: "+ *it);
122 break; 127 break;
123 } else { 128 } else {
124 status = Data; 129 status = Data;
@@ -129,6 +134,7 @@ void SmtpClient::incomingData()
129 if (response[0] == '2') { 134 if (response[0] == '2') {
130 *stream << "DATA\r\n"; 135 *stream << "DATA\r\n";
131 status = Body; 136 status = Body;
137 qDebug("DATA");
132 emit updateStatus(tr("Sending: ") + mailPtr->subject); 138 emit updateStatus(tr("Sending: ") + mailPtr->subject);
133 } else errorHandling(ErrUnknownResponse); 139 } else errorHandling(ErrUnknownResponse);
134 break; 140 break;
@@ -142,6 +148,7 @@ void SmtpClient::incomingData()
142 } else { 148 } else {
143 status = Quit; 149 status = Quit;
144 } 150 }
151 qDebug("BODY");
145 } else errorHandling(ErrUnknownResponse); 152 } else errorHandling(ErrUnknownResponse);
146 break; 153 break;
147 } 154 }
@@ -156,6 +163,7 @@ void SmtpClient::incomingData()
156 mailList.clear(); 163 mailList.clear();
157 sending = FALSE; 164 sending = FALSE;
158 socket->close(); 165 socket->close();
166 qDebug("QUIT");
159 } else errorHandling(ErrUnknownResponse); 167 } else errorHandling(ErrUnknownResponse);
160 break; 168 break;
161 } 169 }