ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/motd.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/motd.c (file contents):
Revision 2168 by michael, Sun Jun 2 20:08:01 2013 UTC vs.
Revision 2190 by michael, Tue Jun 4 12:53:00 2013 UTC

# Line 126 | Line 126 | motd_cache(struct Motd *motd)
126      }
127    }
128  
129 <  /* gotta read in the file, now */
130 <  if ((file = fopen(motd->path, "r")) == NULL)
129 >  /* need the file's modification time */
130 >  if (stat(motd->path, &sb) == -1)
131    {
132 <    ilog(LOG_TYPE_IRCD, "Couldn't open \"%s\": %s", motd->path,
132 >    ilog(LOG_TYPE_IRCD, "Couldn't stat \"%s\": %s", motd->path,
133           strerror(errno));
134      return 0;
135    }
136  
137 <  /* need the file's modification time */
138 <  if (stat(motd->path, &sb) == -1)
137 >  /* gotta read in the file, now */
138 >  if ((file = fopen(motd->path, "r")) == NULL)
139    {
140 <    fclose(file);
140 >    ilog(LOG_TYPE_IRCD, "Couldn't open \"%s\": %s", motd->path,
141 >         strerror(errno));
142      return 0;
143    }
144  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)