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

Diff for /src/usr.bin/ftp/ftp.c between version 1.78 and 1.79

version 1.78, 2009/04/27 23:20:48 version 1.79, 2009/06/06 23:14:44
Line 1196 
Line 1196 
         return;          return;
   
 abort:  abort:
           /* abort using RFC959 recommended IP,SYNC sequence */
 /* abort using RFC959 recommended IP,SYNC sequence */  
   
         progress = oprogress;          progress = oprogress;
         preserve = opreserve;          preserve = opreserve;
         if (oldintp)          if (oldintp)
Line 1974 
Line 1972 
         return (new);          return (new);
 }  }
   
   jmp_buf forceabort;
   
   /* ARGSUSED */
 void  void
   abortforce(int signo)
   {
           fputs("Forced abort.  The connection will be closed.\n", ttyout);
           (void)fflush(ttyout);
   
           if (cout) {
                   (void)fclose(cout);
           }
           cout = NULL;
   
           longjmp(forceabort, 1);
   }
   
   void
 abort_remote(FILE *din)  abort_remote(FILE *din)
 {  {
         char buf[BUFSIZ];          char buf[BUFSIZ];
         int nfnd;          int nfnd;
         struct pollfd pfd[2];          struct pollfd pfd[2];
           sig_t oldintr;
   
         if (cout == NULL) {          if (cout == NULL || setjmp(forceabort)) {
                 warnx("Lost control connection for abort.");                  warnx("Lost control connection for abort.");
                 if (ptabflg)                  if (ptabflg)
                         code = -1;                          code = -1;
Line 1989 
Line 2005 
                 return;                  return;
         }          }
   
           oldintr = signal(SIGINT, abortforce);
   
         /*          /*
          * send IAC in urgent mode instead of DM because 4.3BSD places oob mark           * send IAC in urgent mode instead of DM because 4.3BSD places oob mark
          * after urgent byte rather than before as is protocol now           * after urgent byte rather than before as is protocol now
Line 2022 
Line 2040 
                 (void)getreply(0);                  (void)getreply(0);
         }          }
         (void)getreply(0);          (void)getreply(0);
           (void)signal(SIGINT, oldintr);
 }  }

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79