comparison src/dnsbl.cpp @ 387:616e46e9b8f0

start parsing spf txt records
author Carl Byington <carl@five-ten-sg.com>
date Mon, 06 Mar 2017 15:41:14 -0800
parents e27e22f6a49a
children 2354a1944e49
comparison
equal deleted inserted replaced
386:e27e22f6a49a 387:616e46e9b8f0
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_search(question+1, ns_c_in, int8_t(question[0]), glom.answer, sizeof(glom.answer)); 890 int res_result = res_query(question+1, ns_c_in, int8_t(question[0]), glom.answer, sizeof(glom.answer));
891 //#ifdef RESOLVER_DEBUG 891 //#ifdef RESOLVER_DEBUG
892 char text[1000]; 892 char text[1000];
893 snprintf(text, sizeof(text), "process_resolver_requests() has a question %s qtype %d buf len %d result %d", question+1, int8_t(question[0]), sizeof(glom.answer), res_result); 893 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);
894 my_syslog(text); 895 my_syslog(text);
895 //#endif 896 //#endif
896 if (res_result < 0) glom.length = 0; // represent all errors as zero length answers 897 if (res_result < 0) glom.length = 0; // represent all errors as zero length answers
897 else glom.length = (size_t)res_result; 898 else glom.length = (size_t)res_result;
898 #else 899 #else