fix switch_file_printf
This commit is contained in:
parent
842ea87d64
commit
14678d54c1
|
@ -462,9 +462,18 @@ SWITCH_DECLARE(int) switch_file_printf(switch_file_t *thefile, const char *forma
|
|||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
char *data;
|
||||
|
||||
va_start(ap, format);
|
||||
ret = apr_file_printf(thefile, format, ap);
|
||||
|
||||
if ((ret = switch_vasprintf(&data, format, ap)) != -1) {
|
||||
switch_size_t bytes = strlen(data);
|
||||
switch_file_write(thefile, data, &bytes);
|
||||
free(data);
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue