don't check for a correct reply
This commit is contained in:
@ -959,16 +959,18 @@ Sam3Connection *sam3StreamConnect(Sam3Session *ses, const char *destkey) {
|
||||
strcpyerr(ses, "IO_ERROR");
|
||||
goto error;
|
||||
}
|
||||
if (!sam3IsGoodReply(rep, "STREAM", "STATUS", "RESULT", "OK")) {
|
||||
const char *v = sam3FindField(rep, "RESULT");
|
||||
//
|
||||
strcpyerr(ses, (v != NULL && v[0] ? v : "I2P_ERROR"));
|
||||
sam3CloseConnectionInternal(conn);
|
||||
free(conn);
|
||||
conn = NULL;
|
||||
} else {
|
||||
// no error
|
||||
strcpyerr(ses, NULL);
|
||||
if (!ses->silent){
|
||||
if (!sam3IsGoodReply(rep, "STREAM", "STATUS", "RESULT", "OK")) {
|
||||
const char *v = sam3FindField(rep, "RESULT");
|
||||
//
|
||||
strcpyerr(ses, (v != NULL && v[0] ? v : "I2P_ERROR"));
|
||||
sam3CloseConnectionInternal(conn);
|
||||
free(conn);
|
||||
conn = NULL;
|
||||
} else {
|
||||
// no error
|
||||
strcpyerr(ses, NULL);
|
||||
}
|
||||
}
|
||||
sam3FreeFieldList(rep);
|
||||
if (conn != NULL) {
|
||||
@ -1016,11 +1018,13 @@ Sam3Connection *sam3StreamAccept(Sam3Session *ses) {
|
||||
strcpyerr(ses, "IO_ERROR_RP");
|
||||
goto error;
|
||||
}
|
||||
if (!sam3IsGoodReply(rep, "STREAM", "STATUS", "RESULT", "OK")) {
|
||||
const char *v = sam3FindField(rep, "RESULT");
|
||||
//
|
||||
strcpyerr(ses, (v != NULL && v[0] ? v : "I2P_ERROR_RES"));
|
||||
goto error;
|
||||
if (!ses->silent){
|
||||
if (!sam3IsGoodReply(rep, "STREAM", "STATUS", "RESULT", "OK")) {
|
||||
const char *v = sam3FindField(rep, "RESULT");
|
||||
//
|
||||
strcpyerr(ses, (v != NULL && v[0] ? v : "I2P_ERROR_RES"));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
if (sam3tcpReceiveStr(conn->fd, repstr, sizeof(repstr)) < 0) {
|
||||
strcpyerr(ses, "IO_ERROR_RP1");
|
||||
@ -1092,11 +1096,13 @@ int sam3StreamForward(Sam3Session *ses, const char *hostname, int port) {
|
||||
strcpyerr(ses, "IO_ERROR_RP");
|
||||
goto error;
|
||||
}
|
||||
if (!sam3IsGoodReply(rep, "STREAM", "STATUS", "RESULT", "OK")) {
|
||||
const char *v = sam3FindField(rep, "RESULT");
|
||||
//
|
||||
strcpyerr(ses, (v != NULL && v[0] ? v : "I2P_ERROR_RES"));
|
||||
goto error;
|
||||
if (!ses->silent){
|
||||
if (!sam3IsGoodReply(rep, "STREAM", "STATUS", "RESULT", "OK")) {
|
||||
const char *v = sam3FindField(rep, "RESULT");
|
||||
//
|
||||
strcpyerr(ses, (v != NULL && v[0] ? v : "I2P_ERROR_RES"));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
sam3FreeFieldList(rep);
|
||||
strcpyerr(ses, NULL);
|
||||
|
Reference in New Issue
Block a user