diff --git a/enum.c b/enum.c index 143b22281b78c80321f526af613bcb5ef99b0829..5d9bab76e35630c47223b59eca83a451968d44ba 100755 --- a/enum.c +++ b/enum.c @@ -87,9 +87,11 @@ static int parse_naptr(unsigned char *dst, int dstsize, char *tech, int techsize regex_t preg; regmatch_t pmatch[9]; + + strcpy(dst, ""); if (len < sizeof(struct naptr)) { - printf("Length too short\n"); + ast_log(LOG_WARNING, "Length too short\n"); return -1; } answer += sizeof(struct naptr); @@ -135,9 +137,9 @@ static int parse_naptr(unsigned char *dst, int dstsize, char *tech, int techsize } else if (!strncasecmp(services, "e2u+voice:", 10)) { strncpy(tech, services+10, techsize -1); } else { - ast_log(LOG_WARNING, + ast_log(LOG_DEBUG, "Services must be e2u+${tech}, ${tech}+e2u, or e2u+voice: where $tech is from (sip, h323, tel, iax, iax2). \n"); - return -1; + return 0; } /* DEDBUGGING STUB