[PATCH] 108 Fix for trac ticket 1150
Please review the patch which corrects the print message in the do_writes method in sslget.c and revoker.c. -- Abhishek
On Tue, Oct 07, 2014 at 03:01:31PM -0400, Abhishek Koneru wrote:
Please review the patch which corrects the print message in the do_writes method in sslget.c and revoker.c.
-- Abhishek
ACK.
From e157d4f2cfd1bc4c54b38605fa6dcefef974da34 Mon Sep 17 00:00:00 2001 From: Abhishek Koneru <akoneru@redhat.com> Date: Tue, 7 Oct 2014 14:52:53 -0400 Subject: [PATCH] Fixing upstream trac ticket 1150.
In both sslget.c and revoker.c there is an incorrect equality check which compares the output of a comparision operator with a constant(SECFailure) which has a value of -1. The fix will print the correct SECFailure or SECSuccess value for the do_writes method. --- base/native-tools/src/revoker/revoker.c | 6 ++++-- base/native-tools/src/sslget/sslget.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/base/native-tools/src/revoker/revoker.c b/base/native-tools/src/revoker/revoker.c index c7fc76294a59d2eef498c388b8a150dd10be645a..f0ee1839371c7593b05a514db36a619817a094ff 100644 --- a/base/native-tools/src/revoker/revoker.c +++ b/base/native-tools/src/revoker/revoker.c @@ -325,6 +325,7 @@ do_writes( PRFileDesc * ssl_sock = (PRFileDesc *)a; PRUint32 sent = 0; PRInt32 count = 0; + PRInt32 result = 0;
while (sent < bigBuf.len) {
@@ -343,9 +344,10 @@ do_writes( FPRINTF(stderr, "do_writes shutting down send socket\n"); /* PR_Shutdown(ssl_sock, PR_SHUTDOWN_SEND); */ } + result = (sent < bigBuf.len) ? SECFailure : SECSuccess;
- FPRINTF(stderr, "do_writes exiting with (failure = %d)\n",sent<bigBuf.len == SECFailure); - return (sent < bigBuf.len) ? SECFailure : SECSuccess; + FPRINTF(stderr, "do_writes exiting with (result = %d)\n", result); + return result; }
diff --git a/base/native-tools/src/sslget/sslget.c b/base/native-tools/src/sslget/sslget.c index cfd806785eae8588e2a5c2f9a352ea1a38e83d46..c453096babaadd2fa5b5554652e6803417a868fa 100644 --- a/base/native-tools/src/sslget/sslget.c +++ b/base/native-tools/src/sslget/sslget.c @@ -316,6 +316,7 @@ do_writes( PRFileDesc * ssl_sock = (PRFileDesc *)a; PRUint32 sent = 0; PRInt32 count = 0; + PRInt32 result = 0;
while (sent < bigBuf.len) {
@@ -334,9 +335,10 @@ do_writes( FPRINTF(stderr, "do_writes shutting down send socket\n"); /* PR_Shutdown(ssl_sock, PR_SHUTDOWN_SEND); */ } + result = (sent < bigBuf.len) ? SECFailure : SECSuccess;
- FPRINTF(stderr, "do_writes exiting with (failure = %d)\n",sent<bigBuf.len == SECFailure); - return (sent < bigBuf.len) ? SECFailure : SECSuccess; + FPRINTF(stderr, "do_writes exiting with (result = %d)\n", result); + return result; }
-- 1.8.5.3
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
ACK On Tue, 2014-10-07 at 15:01 -0400, Abhishek Koneru wrote:
Please review the patch which corrects the print message in the do_writes method in sslget.c and revoker.c.
-- Abhishek _______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
participants (3)
-
Abhishek Koneru -
Ade Lee -
Fraser Tweedale