help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] Ange-ftp and vxworks.


From: bpringlemeir
Subject: [h-e-w] Ange-ftp and vxworks.
Date: 28 Sep 2001 20:03:49 -0400
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

I have changed the vxWorks ftp daemon (DOSFS version) to work with the
ange-ftp that comes with Emacs 20.7.3.  I have approximately 20k
tar.bzip FTP client source that compile with mingw (and the vxwork
simulator compiler) on NT.  I did not post a version to the newsgroup
(or NT-Emacs mailing list) due to bandwidth concerns.  If anyone wants
this, they can email me.  I have no idea where the ftp client code
came from.  I downloaded it from somewhere... and got it to compile
with mingw.

It appears that the ange-ftp mailing lists are a little antiquated.

*** c:/TEMP/ftpdLib.c.~1.5~     Fri Sep 28 19:54:07 2001
--- c:/TEMP/ftpdLib.c   Fri Sep 28 19:54:07 2001
***************
*** 1125,1137 ****
  
      (void) pathCat (pSlot->curDirName, path, buffer);
  
!     pathCondense (buffer);              /* condense ".." shit */
  
      *pResult = buffer;
  }
  
  /*****************************************************************************
  *
  * ftpdWorkTask - main protocol processor for the FTP service
  *
  * This function handles all the FTP protocol requests by parsing
--- 1125,1168 ----
  
      (void) pathCat (pSlot->curDirName, path, buffer);
  
!     pathCondense (buffer);              /* condense ".." */
  
      *pResult = buffer;
  }
  
  /*****************************************************************************
  *
+ * ftpPathNormalize - process path provided by client for use
+ *
+ *
+ */
+ LOCAL void angeftpPath
+ (
+     FTPD_SESSION_DATA   *pSlot,
+     char *              path,
+     char *              buffer,
+     char **             pResult
+     )
+ {
+     ftpdDebugMsg("path is (%s).\n", (int)path, 0, 0, 0);
+         
+     if ( (strcmp(path,".") == 0) || (path[0] == EOS) )
+     {
+         /* explicitly relative */
+         *pResult = &pSlot->curDirName [0];
+         return ;
+     }
+ 
+     (void) pathCat (pSlot->curDirName, path, buffer);
+ 
+     if(strcmp(buffer,"/.") == 0)
+         pathCondense (buffer);              /* condense */
+     
+     *pResult = buffer;
+ }
+ 
+ /*****************************************************************************
+ *
  * ftpdWorkTask - main protocol processor for the FTP service
  *
  * This function handles all the FTP protocol requests by parsing
***************
*** 1468,1475 ****
                  STATUS retVal;
  
                  /* client wants to list out the contents of a directory */
!             
!                 ftpPathNormalize ( pSlot, &pBuf[5], newPath, &dirName );
  
                  ftpdDebugMsg ("listing %s\n", (int)dirName,0,0,0);
  
--- 1499,1514 ----
                  STATUS retVal;
  
                  /* client wants to list out the contents of a directory */
!                 if(pBuf[5] != '-')
!                     ftpPathNormalize(pSlot, &pBuf[5], newPath, &dirName);
!                 else
!                 {
!                     unsigned int i;
!                     for(i = 5; i < strlen(pBuf); i++)
!                         if(pBuf[i] == ' ' || pBuf[i] == '\0') break;
!                     if(pBuf[i] != '\0')
!                         angeftpPath(pSlot, &pBuf[i+1], newPath, &dirName);
!                 }
  
                  ftpdDebugMsg ("listing %s\n", (int)dirName,0,0,0);

fwiw,
Bill Pringlemeir.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]