Fix TXT lookups so they dont strip off the last 2 characters

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
James Golovich
2004-07-02 19:20:09 +00:00
parent 2e5873cb5d
commit 9de6aed36b

5
enum.c
View File

@@ -243,9 +243,8 @@ static int txt_callback(void *context, u_char *answer, int len, u_char *fullansw
printf("ENUMTXT Called\n");
#endif
if(answer != NULL)
{
c->txtlen = strlen(answer) - 2;
if (answer != NULL) {
c->txtlen = strlen(answer);
strncpy(c->txt, answer, 255);
c->txt[c->txtlen] = 0;
return 1;