Difference for server/plugins.c from version 1.16 to 1.17


version 1.16 version 1.17
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_plugins_c =   * static char *rcsid_plugins_c =
  *   "$Id: plugins.c,v 1.16 2002/03/20 06:27:46 mwedel Exp $";   *   "$Id: plugins.c,v 1.17 2002/09/07 22:08:07 mwedel Exp $";
  */   */
   
 /*****************************************************************************/  /*****************************************************************************/
Line 134
 
Line 134
     char buf2[MAX_BUF];      char buf2[MAX_BUF];
   
     LOG(llevInfo,"Now initializing plugins\n");      LOG(llevInfo,"Now initializing plugins\n");
     strcpy(buf,DATADIR);      strcpy(buf,LIBDIR);
     strcat(buf,"/plugins/");      strcat(buf,"/plugins/");
     LOG(llevInfo,"Plugins directory is %s\n",buf);      LOG(llevInfo,"Plugins directory is %s\n",buf);
   
Line 433
 
Line 433
 void initPlugins(void)  void initPlugins(void)
 {  {
         struct dirent **namelist=NULL;          struct dirent **namelist=NULL;
         int n;          int n,l;
         char buf[MAX_BUF];          char buf[MAX_BUF];
         char buf2[MAX_BUF];          char buf2[MAX_BUF];
   
         LOG(llevInfo,"Initializing plugins :\n");          LOG(llevInfo,"Initializing plugins :\n");
         strcpy(buf,DATADIR);          strcpy(buf,LIBDIR);
         strcat(buf,"/plugins/");          strcat(buf,"/plugins/");
         n = scandir(buf, &namelist, 0, alphasort);          n = scandir(buf, &namelist, 0, alphasort);
         if (n < 0)          if (n < 0)
Line 446
 
Line 446
         else          else
             while(n--)              while(n--)
             {              {
                 if (strcmp(namelist[n]->d_name,".."))   l=strlen(namelist[n]->d_name);
    if (l>strlen(PLUGIN_SUFFIX))
                 {                  {
                     if (strcmp(namelist[n]->d_name,"."))       if (!strcmp(namelist[n]->d_name+l-strlen(PLUGIN_SUFFIX),PLUGIN_SUFFIX))
                     {                      {
                         strcpy(buf2,buf);                          strcpy(buf2,buf);
                         strcat(buf2,namelist[n]->d_name);                          strcat(buf2,namelist[n]->d_name);


Legend:
line(s) removed in v.1.16 
line(s) changed
 line(s) added in v.1.17

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:43