[asterisk-commits] rizzo: trunk r48501 - /trunk/main/manager.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Dec 15 11:37:29 MST 2006


Author: rizzo
Date: Fri Dec 15 12:37:29 2006
New Revision: 48501

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48501
Log:
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.


Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=48501&r1=48500&r2=48501
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Fri Dec 15 12:37:29 2006
@@ -2759,7 +2759,7 @@
 	}
 	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))) {



More information about the asterisk-commits mailing list