Diff for /rpmfind/transport.c between versions 1.17 and 1.18

version 1.17, 2000/02/02 02:15:59 version 1.18, 2000/05/29 12:55:40
Line 440  static char **doSynchronousFTPList(const Line 440  static char **doSynchronousFTPList(const
         int i;          int i;
   
         if (rpmfindVerbose > 1)          if (rpmfindVerbose > 1)
             printf("failed to get resource : %s\n", URL);              printf("failed to list resource : %s\n", URL);
         for (i = 0;i < listFTPNo;i++)          for (i = 0;i < listFTPNo;i++)
             free(listFTP[i]);              free(listFTP[i]);
         free(listFTP);          free(listFTP);
Line 458  static char **doSynchronousFTPList(const Line 458  static char **doSynchronousFTPList(const
     listFTP[listFTPNo] = NULL;      listFTP[listFTPNo] = NULL;
     return(listFTP);      return(listFTP);
 }  }
   
 static char **doSynchronousFILEList(const char *URL) {  static char **doSynchronousFILEList(const char *URL) {
     return(NULL);      char **listFILE;
       int listFILENo;
       DIR *d;
       struct dirent *file;
   
       d = opendir(URL);
       if (d == NULL) {
           fprintf(stderr, "Listing of %s failed\n", URL);
           return(NULL);
       }
   
       listFILE = (char **) malloc(2000 * sizeof(char*));
       listFILENo = 0;
       if (listFILE == NULL) {
           fprintf(stderr, "Out of memory error\n");
           return(NULL);
       }
   
       while ((file = readdir(d)) != NULL) {
           listFILE[listFILENo] = strdup(file->d_name);
           listFILENo++;
       }
   
       listFILE[listFILENo] = NULL;
       return(listFILE);
 }  }
 static char **doSynchronousHTTPList(const char *URL) {  static char **doSynchronousHTTPList(const char *URL) {
     /* TODO: !!!! it's horrible, maybe in libxml ! */      /* TODO: !!!! it's horrible, maybe in libxml ! */
Line 487  static char **doSynchronousList(const ch Line 512  static char **doSynchronousList(const ch
             if (rpmfindVerbose)              if (rpmfindVerbose)
                 printf("HTTPList returned : NULL\n");                  printf("HTTPList returned : NULL\n");
         }          }
     } else if (!strncmp(URL, "file:/", 7)) {      } else if (!strncmp(URL, "file:/", 6)) {
         res = doSynchronousFILEList(&URL[5]);          res = doSynchronousFILEList(&URL[5]);
         if (res == NULL) {          if (res == NULL) {
             if (rpmfindVerbose)              if (rpmfindVerbose)

Removed from v.1.17  
changed lines
  Added in v.1.18


Webmaster