comparison src/context.cpp @ 391:88ef2b4e6f1e

start parsing spf txt records
author Carl Byington <carl@five-ten-sg.com>
date Mon, 06 Mar 2017 17:23:05 -0800
parents bcef093b1ba6
children ea458101de9b
comparison
equal deleted inserted replaced
390:bcef093b1ba6 391:88ef2b4e6f1e
1152 } 1152 }
1153 } 1153 }
1154 } 1154 }
1155 if (b) *b = ' '; 1155 if (b) *b = ' ';
1156 if (s) *s = '/'; 1156 if (s) *s = '/';
1157 p = (b) ? b+1 : e; 1157 p = (b) ? b : e;
1158 } 1158 }
1159 p = buf; 1159 p = buf;
1160 while ((level < 5) && (p = strstr(p, " include:"))) { 1160 while ((level < 5) && (p = strstr(p, " include:"))) {
1161 p += 9; 1161 p += 9;
1162 char *b = strchr(p, ' '); 1162 char *b = strchr(p, ' ');
1163 if (b) *b = '\0'; 1163 if (b) *b = '\0';
1164 if (resolve_spf(p, ip, priv, level+1)) return true; 1164 if (resolve_spf(p, ip, priv, level+1)) return true;
1165 if (b) *b = ' '; 1165 if (b) *b = ' ';
1166 p = (b) ? b+1 : e; 1166 p = (b) ? b : e;
1167 } 1167 }
1168 } 1168 }
1169 return false; 1169 return false;
1170 } 1170 }
1171 1171