[BACK]Return to fetch.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ftp

Diff for /src/usr.bin/ftp/fetch.c between version 1.196 and 1.197

version 1.196, 2020/07/04 10:18:49 version 1.197, 2020/07/04 11:23:35
Line 72 
Line 72 
 static int      url_get(const char *, const char *, const char *, int);  static int      url_get(const char *, const char *, const char *, int);
 static int      save_chunked(FILE *, struct tls *, int , char *, size_t);  static int      save_chunked(FILE *, struct tls *, int , char *, size_t);
 static void     aborthttp(int);  static void     aborthttp(int);
 static void     abortfile(int);  
 static char     hextochar(const char *);  static char     hextochar(const char *);
 static char     *urldecode(const char *);  static char     *urldecode(const char *);
 static char     *recode_credentials(const char *_userinfo);  static char     *recode_credentials(const char *_userinfo);
Line 248 
Line 247 
                         (void)signal(SIGINFO, oldinti);                          (void)signal(SIGINFO, oldinti);
                 goto cleanup_copy;                  goto cleanup_copy;
         }          }
         oldintr = signal(SIGINT, abortfile);          oldintr = signal(SIGINT, aborthttp);
   
         bytes = 0;          bytes = 0;
         hashbytes = mark;          hashbytes = mark;
Line 1187 
Line 1186 
 static void  static void
 aborthttp(int signo)  aborthttp(int signo)
 {  {
           const char errmsg[] = "\nfetch aborted.\n";
   
         alarmtimer(0);          alarmtimer(0);
         fputs("\nhttp fetch aborted.\n", ttyout);          write(fileno(ttyout), errmsg, sizeof(errmsg) - 1);
         (void)fflush(ttyout);  
         longjmp(httpabort, 1);  
 }  
   
 /*  
  * Abort a http retrieval  
  */  
 /* ARGSUSED */  
 static void  
 abortfile(int signo)  
 {  
   
         alarmtimer(0);  
         fputs("\nfile fetch aborted.\n", ttyout);  
         (void)fflush(ttyout);  
         longjmp(httpabort, 1);          longjmp(httpabort, 1);
 }  }
   

Legend:
Removed from v.1.196  
changed lines
  Added in v.1.197