@@ -959,16 +959,18 @@ Sam3Connection *sam3StreamConnect(Sam3Session *ses, const char *destkey) {
959
959
strcpyerr (ses , "IO_ERROR" );
960
960
goto error ;
961
961
}
962
- if (!sam3IsGoodReply (rep , "STREAM" , "STATUS" , "RESULT" , "OK" )) {
963
- const char * v = sam3FindField (rep , "RESULT" );
964
- //
965
- strcpyerr (ses , (v != NULL && v [0 ] ? v : "I2P_ERROR" ));
966
- sam3CloseConnectionInternal (conn );
967
- free (conn );
968
- conn = NULL ;
969
- } else {
970
- // no error
971
- strcpyerr (ses , NULL );
962
+ if (!ses -> silent ){
963
+ if (!sam3IsGoodReply (rep , "STREAM" , "STATUS" , "RESULT" , "OK" )) {
964
+ const char * v = sam3FindField (rep , "RESULT" );
965
+ //
966
+ strcpyerr (ses , (v != NULL && v [0 ] ? v : "I2P_ERROR" ));
967
+ sam3CloseConnectionInternal (conn );
968
+ free (conn );
969
+ conn = NULL ;
970
+ } else {
971
+ // no error
972
+ strcpyerr (ses , NULL );
973
+ }
972
974
}
973
975
sam3FreeFieldList (rep );
974
976
if (conn != NULL ) {
@@ -1016,11 +1018,13 @@ Sam3Connection *sam3StreamAccept(Sam3Session *ses) {
1016
1018
strcpyerr (ses , "IO_ERROR_RP" );
1017
1019
goto error ;
1018
1020
}
1019
- if (!sam3IsGoodReply (rep , "STREAM" , "STATUS" , "RESULT" , "OK" )) {
1020
- const char * v = sam3FindField (rep , "RESULT" );
1021
- //
1022
- strcpyerr (ses , (v != NULL && v [0 ] ? v : "I2P_ERROR_RES" ));
1023
- goto error ;
1021
+ if (!ses -> silent ){
1022
+ if (!sam3IsGoodReply (rep , "STREAM" , "STATUS" , "RESULT" , "OK" )) {
1023
+ const char * v = sam3FindField (rep , "RESULT" );
1024
+ //
1025
+ strcpyerr (ses , (v != NULL && v [0 ] ? v : "I2P_ERROR_RES" ));
1026
+ goto error ;
1027
+ }
1024
1028
}
1025
1029
if (sam3tcpReceiveStr (conn -> fd , repstr , sizeof (repstr )) < 0 ) {
1026
1030
strcpyerr (ses , "IO_ERROR_RP1" );
@@ -1092,11 +1096,13 @@ int sam3StreamForward(Sam3Session *ses, const char *hostname, int port) {
1092
1096
strcpyerr (ses , "IO_ERROR_RP" );
1093
1097
goto error ;
1094
1098
}
1095
- if (!sam3IsGoodReply (rep , "STREAM" , "STATUS" , "RESULT" , "OK" )) {
1096
- const char * v = sam3FindField (rep , "RESULT" );
1097
- //
1098
- strcpyerr (ses , (v != NULL && v [0 ] ? v : "I2P_ERROR_RES" ));
1099
- goto error ;
1099
+ if (!ses -> silent ){
1100
+ if (!sam3IsGoodReply (rep , "STREAM" , "STATUS" , "RESULT" , "OK" )) {
1101
+ const char * v = sam3FindField (rep , "RESULT" );
1102
+ //
1103
+ strcpyerr (ses , (v != NULL && v [0 ] ? v : "I2P_ERROR_RES" ));
1104
+ goto error ;
1105
+ }
1100
1106
}
1101
1107
sam3FreeFieldList (rep );
1102
1108
strcpyerr (ses , NULL );
0 commit comments