Changeset 92f3772 in blaster


Ignore:
Timestamp:
01/23/15 11:13:43 (5 years ago)
Author:
Tarmo Kople <tarmo@…>
Branches:
master
Children:
c1855dd
Parents:
6b8aa22
git-author:
Tarmo Kople <tarmo@…> (01/23/15 11:13:43)
git-committer:
Tarmo Kople <tarmo@…> (01/23/15 11:13:43)
Message:

+ fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main.c

    r6b8aa22 r92f3772  
    216216    printf("Waiting for IR data. Press button on the remote control now !!!\n"); 
    217217    irframe_t irframe; 
    218     int maxtryes = 5; 
     218    int maxtryes = 3; 
    219219    while (maxtryes--) { 
    220220        printf("."); 
     
    278278        record_t record; 
    279279        fseek(fd, sizeof(evTable) + sizeof(record) * eventNum, 0); 
    280         fread(&record, 1, sizeof(record), fd); 
     280        if(fread(&record, 1, sizeof(record), fd) != sizeof(record)){ 
     281            fprintf(stderr, "Database read error !\n"); 
     282            exit(EXIT_FAILURE); 
     283        } 
    281284 
    282285        Vset_irframe(&vhandle, &record.frameData); 
     
    285288        exit(EXIT_SUCCESS); 
    286289    } 
    287     fprintf(stderr, "No such event to blast: %s", evname); 
     290    fprintf(stderr, "No such event to blast: %s\n", evname); 
    288291    exit(EXIT_FAILURE); 
    289292} 
     
    304307 * @brief Main program 
    305308 * 
    306  * Parse command line arguments, exec actions 
     309 * Parse command-line arguments, exec actions 
    307310 * 
    308311 * @param argc 
Note: See TracChangeset for help on using the changeset viewer.