Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_cat.c
r481 r525 72 72 { MSG_CHECK_2, SH_ERR_STAMP, STAMP, N_("msg=\"File check starting.\"")}, 73 73 { MSG_STAMP, SH_ERR_STAMP, STAMP, N_("msg=\"---- TIMESTAMP ----\"")}, 74 74 { MSG_DCLOSE, SH_ERR_NOTICE, RUN, N_("msg=\"Finished writing baseline database.\"")}, 75 75 76 { MSG_D_START, SH_ERR_INFO, RUN, N_("msg=\"Downloading configuration file\"")}, 76 77 { MSG_D_DSTART, SH_ERR_INFO, RUN, N_("msg=\"Downloading database file\"")}, … … 403 404 { MSG_CHECK_2, SH_ERR_STAMP, STAMP, N_("msg=<File check starting.>")}, 404 405 { MSG_STAMP, SH_ERR_STAMP, STAMP, N_("msg=<---- TIMESTAMP ---->")}, 406 { MSG_DCLOSE, SH_ERR_NOTICE, RUN, N_("msg=<Finished writing baseline database.>")}, 405 407 406 408 { MSG_D_START, SH_ERR_INFO, RUN, N_("msg=<Downloading configuration file>")}, -
trunk/src/sh_dbIO.c
r491 r525 152 152 } 153 153 154 /* Seek to [SOF] and truncate remainder of file 155 */ 154 156 static int sh_dbIO_setdataent_old (SL_TICKET fd, char * line, int size, 155 157 const char * file) … … 1117 1119 } 1118 1120 1121 /* Seek to [SOF] and truncate remainder 1122 */ 1119 1123 static int seek_writeout_data_old(SL_TICKET fd, const char * path) 1120 1124 { 1121 1125 char * line = SH_ALLOC(MAX_PATH_STORE+1); 1122 1126 1127 /* This will do an ftruncate() after the sof marker 1128 */ 1123 1129 if (SL_ISERROR(sh_dbIO_setdataent_old (fd, line, MAX_PATH_STORE, path))) 1124 1130 { 1125 1131 SH_FREE(line); 1126 1132 sh_error_handle((-1), FIL__, __LINE__, 0, MSG_E_SUBGPATH, 1127 _("Failed to seek to endof baseline database"),1133 _("Failed to seek to start of baseline database"), 1128 1134 _("seek_writeout_data_old"), 1129 1135 path); … … 1414 1420 { 1415 1421 pushdata_fd = open_writeout_data(outpath); 1422 /* Seek to eof */ 1416 1423 seek_writeout_data(pushdata_fd, outpath); 1417 1424 } … … 1424 1431 TPT((0, FIL__, __LINE__, _("msg=<Update.>\n"))); 1425 1432 pushdata_fd = open_writeout_data(outpath); 1433 /* Seek to sof and truncate */ 1426 1434 seek_writeout_data_old(pushdata_fd, outpath); 1427 1435 } … … 1479 1487 if (sh.flag.checkSum != SH_CHECK_INIT || (buf == NULL && fileHash == NULL)) 1480 1488 { 1481 sl_close (pushdata_fd); 1489 if (SL_ISERROR(sl_close (pushdata_fd))) 1490 { 1491 char * tmp = sh_util_safe_name(outpath); 1492 sh_error_handle((-1), FIL__, __LINE__, 0, MSG_E_SUBGPATH, 1493 _("Failed to close baseline database"), 1494 _("sh_dbIO_data_write_int"), 1495 tmp); 1496 SH_FREE(tmp); 1497 } 1498 else { 1499 if (sh.flag.checkSum == SH_CHECK_INIT) 1500 sh_error_handle((-1), FIL__, __LINE__, 0, MSG_DCLOSE); 1501 } 1482 1502 pushdata_fd = -1; 1483 1503 } -
trunk/src/slib.c
r523 r525 2383 2383 _("msg=<Error fclosing file.>, fd=<%d>, err=<%s>\n"), 2384 2384 fd, strerror(errno))); 2385 SL_IRETURN(SL_ECLOSE, _("sl_close")); 2385 2386 } 2386 2387 } … … 2392 2393 _("msg=<Error closing file.>, fd=<%d>, err=<%s>\n"), 2393 2394 fd, strerror(errno))); 2395 SL_IRETURN(SL_ECLOSE, _("sl_close")); 2394 2396 } 2395 2397 }
Note:
See TracChangeset
for help on using the changeset viewer.