[Knode-devel] kdepim/knode
Roberto Selbach Teixeira
maragato at kde.org
Tue Jan 13 18:27:54 CET 2004
CVS commit by maragato:
Don't just test for 200 and 201 as command results. Read all 2xx results as ok (RFC977)
CCMAIL: 72500-done at bugs.kde.org
M +4 -4 knnntpclient.cpp 1.55
--- kdepim/knode/knnntpclient.cpp #1.54:1.55
@@ -561,6 +561,6 @@ bool KNNntpClient::openConnection()
return false;
- if ((rep!=200)&&(rep!=201)) { // 200 server ready - posting allowed
- handleErrors(); // 201 server ready - no posting allowed
+ if ( ( rep < 200 ) || ( rep > 299 ) ) { // RFC977: 2xx - Command ok
+ handleErrors();
return false;
}
@@ -576,6 +576,6 @@ bool KNNntpClient::openConnection()
#endif
} else
- if ((rep!=200)&&(rep!=201)) { // 200 Hello, you can post
- handleErrors(); // 201 Hello, you can't post
+ if ( ( rep < 200 ) || ( rep > 299 ) ) { // RFC977: 2xx - Command ok
+ handleErrors();
return false;
}
More information about the Knode-devel
mailing list