Changeset 208 for SH_SHM/trunk
- Timestamp:
- 04/19/2010 02:53:32 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/source/sqliface.c
r71 r208 3 3 * ========== 4 4 * 5 * $Revision: 56 $, $Date: 2008-10-28 16:01:29 +0100 (Di, 28 Okt 2008) $5 * $Revision: 125 $, $Date: 2010-04-19 14:07:17 +0200 (Mo, 19 Apr 2010) $ 6 6 * 7 7 * Interface to SQL databases … … 194 194 double rd1time, rd2time; /* read time as double */ 195 195 int rd1off, rd2off; /* date part of soffset, eoffset */ 196 FILE *fp; /* file pointer */ 197 TSyBoolean rewrite_sfd; /* rewrite sfd file */ 196 198 197 199 /* executable code */ … … 207 209 if (SySevere(status)) return; 208 210 211 /* if sfd file does not exist, create a new one irrespective of the 212 * given start time and length. Try to open it, to see whether its there 213 */ 214 fp = fopen( sqlv_sfdb_tmp, "r" ); 215 if (fp == NULL) { 216 /* file does not exist, rewrite file */ 217 rewrite_sfd = TRUE; 218 } else { 219 rewrite_sfd = FALSE; 220 fclose( fp ); 221 } /*endif*/ 222 209 223 /* call to db if new start time given */ 210 if (strcmp(start,last_start) != 0 || readlth != last_readlth ) {224 if (strcmp(start,last_start) != 0 || readlth != last_readlth || rewrite_sfd) { 211 225 tc_nadd( &sntime, -86400*30*3, &soffset, status ); 212 226 if (SySevere(status)) return;
Note: See TracChangeset
for help on using the changeset viewer.