Browse Source

Updating PuTTY 0.76 code to C++ Builder compiler

Source commit: f3e548ff02c751073be51deacc1e3b96d2b81f48
Martin Prikryl 4 years ago
parent
commit
9055bb8375
2 changed files with 8 additions and 0 deletions
  1. 4 0
      source/putty/ssh2userauth.c
  2. 4 0
      source/putty/windows/winhandl.c

+ 4 - 0
source/putty/ssh2userauth.c

@@ -1352,6 +1352,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl)
                     uint32_t i;
                     for (i = 0; i < s->num_prompts; i++) {
                         s->is_trivial_auth = false;
+                        { // WINSCP
                         ptrlen prompt = get_string(pktin);
                         bool echo = get_bool(pktin);
 
@@ -1375,6 +1376,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl)
                             put_datapl(sb, prompt);
                         }
                         add_prompt(s->cur_prompt, strbuf_to_str(sb), echo);
+                        } // WINSCP
                     }
                     } // WINSCP
 
@@ -1522,6 +1524,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl)
 
             } else if (s->can_passwd) {
                 s->is_trivial_auth = false;
+                { // WINSCP
                 /*
                  * Plain old password authentication.
                  */
@@ -1778,6 +1781,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl)
                  */
                 smemclr(s->password, strlen(s->password));
                 sfree(s->password);
+                } // WINSCP
 
             } else {
                 ssh_bpp_queue_disconnect(

+ 4 - 0
source/putty/windows/winhandl.c

@@ -455,6 +455,7 @@ struct handle *handle_input_new(tree234 * handles_by_evtomain, HANDLE handle, ha
     #endif
     add234(handles_by_evtomain, h);
 
+    { // WINSCP
     HANDLE hThread = CreateThread(NULL, 0, handle_input_threadfunc,
                                   &h->u.i, 0, &in_threadid);
     if (hThread)
@@ -462,6 +463,7 @@ struct handle *handle_input_new(tree234 * handles_by_evtomain, HANDLE handle, ha
     h->u.i.busy = true;
 
     return h;
+    } // WINSCP
 }
 
 struct handle *handle_output_new(tree234 * handles_by_evtomain, HANDLE handle, handle_outputfn_t sentdata, // WINSCP
@@ -490,12 +492,14 @@ struct handle *handle_output_new(tree234 * handles_by_evtomain, HANDLE handle, h
     #endif
     add234(handles_by_evtomain, h);
 
+    { // WINSCP
     HANDLE hThread = CreateThread(NULL, 0, handle_output_threadfunc,
                                   &h->u.o, 0, &out_threadid);
     if (hThread)
         CloseHandle(hThread);          /* we don't need the thread handle */
 
     return h;
+    } // WINSCP
 }
 
 #ifndef WINSCP