Changeset 79f994


Ignore:
Timestamp:
02/08/07 21:53:37 (6 years ago)
Author:
Erik Ekman <yarrick@…>
Branches:
master, iodine-0.4, iodine-0.5, iodine-0.6
Children:
71e935
Parents:
a8127f
git-author:
Erik Ekman <yarrick@…> (02/08/07 21:53:37)
git-committer:
Erik Ekman <yarrick@…> (02/08/07 21:53:37)
Message:

#3 fixed decode query test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/dns.c

    rda636b r79f994  
    5050         
    5151static char *msgData = "this is the message to be delivered"; 
     52static char *topdomain = "kryo.se"; 
    5253         
    5354static char *queryData = "HELLO this is the test data"; 
     
    151152{ 
    152153        char buf[512]; 
     154        char *domain; 
    153155        struct query q; 
    154156        int len; 
     
    160162        len = sizeof(queryPacket) - 1; 
    161163 
    162         ret = dns_decode(buf, sizeof(buf), &q, QR_QUERY, queryPacket, len); 
     164        dns_decode(buf, sizeof(buf), &q, QR_QUERY, queryPacket, len); 
     165        domain = strstr(q.name, topdomain); 
     166        ret = decode_data(buf, sizeof(buf), q.name, domain); 
    163167 
    164168        fail_unless(strncmp(buf, recData, ret) == 0, "Did not extract expected host: '%s'", buf); 
Note: See TracChangeset for help on using the changeset viewer.