|
|
@@ -345,7 +345,7 @@ int format_new_passdb()
|
|
|
|
|
|
if( fd < 0 )
|
|
|
{
|
|
|
- fprintf(stderr, "Cannot create pass file!\n");
|
|
|
+ fprintf(stderr, "Cannot create pass file '%s'!\n", PASSES_FILE);
|
|
|
return FAIL_DATABASE;
|
|
|
}
|
|
|
|
|
|
@@ -355,7 +355,7 @@ int format_new_passdb()
|
|
|
{
|
|
|
if( write(fd, &blank, sizeof(blank)) != sizeof(blank) )
|
|
|
{
|
|
|
- fprintf(stderr, "Cannot write blank data to passes file!\n");
|
|
|
+ fprintf(stderr, "Cannot write blank data to passes file '%s'!\n", PASSES_FILE);
|
|
|
close(fd);
|
|
|
return FAIL_DATABASE;
|
|
|
}
|
|
|
@@ -449,7 +449,7 @@ int attach_to_passdb(passdb_context *ctx)
|
|
|
|
|
|
if(fd < 0)
|
|
|
{
|
|
|
- fprintf(stderr, "Cannot open passes file!\n");
|
|
|
+ fprintf(stderr, "Cannot open passes file '%s'!\n", PASSES_FILE);
|
|
|
return FAIL_DATABASE;
|
|
|
}
|
|
|
|
|
|
@@ -819,6 +819,10 @@ int update_rider(passdb_context *ctx, rider_record *rec, int sync)
|
|
|
mag_idx = find_mag_in_hash(ctx, rec->magstripe_value);
|
|
|
rf_idx = find_rf_in_hash(ctx, rec->rfid_value);
|
|
|
|
|
|
+ if ((mag_idx < 0) || (rf_idx < 0)) {
|
|
|
+ //pass
|
|
|
+ }
|
|
|
+
|
|
|
// We want to allow a short period of magstrip or RFID collision as the lesser of two evils vs. **STUPID**
|
|
|
// possibly losing a record due to a degenerately stupid administrator doing the following:
|
|
|
//
|