comparison src/dnsbl.cpp @ 388:2354a1944e49

start parsing spf txt records
author Carl Byington <carl@five-ten-sg.com>
date Mon, 06 Mar 2017 16:22:15 -0800
parents 616e46e9b8f0
children aa9795b407e8
comparison
equal deleted inserted replaced
387:616e46e9b8f0 388:2354a1944e49
885 } 885 }
886 question[rs-1] = '\0'; // ensure null termination 886 question[rs-1] = '\0'; // ensure null termination
887 887
888 // find the answer 888 // find the answer
889 #ifdef NS_PACKETSZ 889 #ifdef NS_PACKETSZ
890 int res_result = res_query(question+1, ns_c_in, int8_t(question[0]), glom.answer, sizeof(glom.answer)); 890 int qt = int8_t(question[0]);
891 int res_result = res_query(question+1, ns_c_in, qt, glom.answer, sizeof(glom.answer));
891 //#ifdef RESOLVER_DEBUG 892 //#ifdef RESOLVER_DEBUG
892 char text[1000]; 893 char text[1000];
893 snprintf(text, sizeof(text), "process_resolver_requests() has a question %s qtype %d buf len %d result %d", 894 snprintf(text, sizeof(text), "process_resolver_requests() has a question %s qtype %d buf len %d result %d",
894 question+1, int8_t(question[0]), sizeof(glom.answer), res_result); 895 question+1, qt, sizeof(glom.answer), res_result);
895 my_syslog(text); 896 my_syslog(text);
896 //#endif 897 //#endif
897 if (res_result < 0) glom.length = 0; // represent all errors as zero length answers 898 if (res_result < 0) glom.length = 0; // represent all errors as zero length answers
898 else glom.length = (size_t)res_result; 899 else glom.length = (size_t)res_result;
899 #else 900 #else