Fix for 0000252: authentication failed error when PCP command is cancelled...
authorMuhammad Usama <m.usama@gmail.com>
Tue, 18 Oct 2016 10:46:15 +0000 (15:46 +0500)
committerMuhammad Usama <m.usama@gmail.com>
Tue, 18 Oct 2016 10:46:15 +0000 (15:46 +0500)
Fixed by adding the volatile modifier to authenticated flag, to make sure we
always get the updated value after the long jump.

src/pcp_con/pcp_worker.c

index 925c5f1690572ba06b622b99425e9436cc2fef3c..5fdfdf0c8be008e158dc13cb41e63b41c25022b5 100644 (file)
@@ -95,7 +95,7 @@ pcp_worker_main(int port)
 {
        sigjmp_buf      local_sigjmp_buf;
        MemoryContext PCPMemoryContext;
-       int authenticated = 0;
+       volatile int authenticated = 0;
 
        char salt[4];
        int random_salt = 0;