diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-10 05:29:46 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-10 05:29:46 +0000 |
commit | eac6554b7cb355033dd30d7ea8208fa7b24bb8ac (patch) | |
tree | 8588539e6bbf19d976c3aad3b31094719ea99cca /apps | |
parent | 1e9da76cb752f62fba811dae22c043e178c646eb (diff) |
Truncate file as appropriate (bug #3304)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4746 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_voicemail.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 7ca0132e6..5d8e8f9c9 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -772,6 +772,8 @@ static int retrieve_file(char *dir, int msgnum) SQLFreeHandle (SQL_HANDLE_STMT, stmt); goto yuck; } + fdlen = colsize; + ftruncate(fd, fdlen); } } else { res = SQLGetData(stmt, x + 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL); @@ -780,7 +782,6 @@ static int retrieve_file(char *dir, int msgnum) SQLFreeHandle (SQL_HANDLE_STMT, stmt); goto yuck; } - printf("Got field '%s'\n", coltitle); if (strcmp(coltitle, "msgnum") && strcmp(coltitle, "dir") && f) fprintf(f, "%s=%s\n", coltitle, rowdata); } |