From: Luigi Rizzo Date: Fri, 15 Dec 2006 18:37:29 +0000 (+0000) Subject: unbreak the output for http session. X-Git-Tag: 1.6.0-beta1~3^2~3724 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e427d84bd2dfe4bba575b7f707a77a9d2f1606d;p=thirdparty%2Fasterisk.git unbreak the output for http session. Not long ago i replaced lseek() with fseek() but forgot that filr FILE's you need ftell to give you the current position. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48501 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/manager.c b/main/manager.c index 083f42fc35..5ce5fa98ae 100644 --- a/main/manager.c +++ b/main/manager.c @@ -2759,7 +2759,7 @@ static char *generic_http_callback(enum output_format format, } if (s->f != NULL) { /* have temporary output */ char *buf; - off_t l = fseek(s->f, 0, SEEK_END); /* how many chars available */ + int l = ftell(s->f); /* always return something even if len == 0 */ if ((buf = ast_calloc(1, l+1))) {