Created
February 6, 2014 17:42
-
-
Save rainest/8849013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sm_marid_is_fqdn(sm_marid *context, char const *s) | |
{ | |
int saw_dot = 0; | |
if (s == NULL || *s == '\0') | |
{ | |
sm_marid_log(context, SM_MARID_LOG_FAIL, | |
"*** domain is %s ***", | |
s == NULL ? "null" : "empty"); | |
return 0; | |
} | |
for (;;) | |
{ | |
if (!FQDN_ISLETDIG(*s)) | |
{ | |
sm_marid_log(context, SM_MARID_LOG_FAIL, | |
"*** domain segment starts with '%c', which " | |
"is not a letter or digit ***", *s); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment