mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-16 22:38:38 +00:00
FS-3166 --resolve
This commit is contained in:
1 parent
c22aac0eac
commit
73279f01bf
41 files changed
+125
-258
No files matched your search
@@ -94,7 +94,6 @@ static void do_rotate(cdr_fd_t *fd)
|
||||
char date[80] = "";
|
||||
switch_size_t retsize;
|
||||
char *p;
|
||||
size_t len;
|
||||
|
||||
close(fd->fd);
|
||||
fd->fd = -1;
|
||||
@@ -103,7 +102,7 @@ static void do_rotate(cdr_fd_t *fd)
|
||||
switch_time_exp_lt(&tm, switch_micro_time_now());
|
||||
switch_strftime_nocheck(date, &retsize, sizeof(date), "%Y-%m-%d-%H-%M-%S", &tm);
|
||||
|
||||
len = strlen(fd->path) + strlen(date) + 2;
|
||||
|
||||
p = switch_mprintf("%s.%s", fd->path, date);
|
||||
assert(p);
|
||||
switch_file_rename(fd->path, p, globals.pool);
|
||||
|
||||
@@ -990,19 +990,19 @@ SWITCH_STANDARD_API(event_sink_function)
|
||||
stream->write_function(stream, "<events>\n");
|
||||
|
||||
while (switch_queue_trypop(listener->event_queue, &pop) == SWITCH_STATUS_SUCCESS) {
|
||||
char *etype;
|
||||
//char *etype;
|
||||
pevent = (switch_event_t *) pop;
|
||||
|
||||
if (listener->format == EVENT_FORMAT_PLAIN) {
|
||||
etype = "plain";
|
||||
//etype = "plain";
|
||||
switch_event_serialize(pevent, &listener->ebuf, SWITCH_TRUE);
|
||||
stream->write_function(stream, "<event type=\"plain\">\n%s</event>", listener->ebuf);
|
||||
} else if (listener->format == EVENT_FORMAT_JSON) {
|
||||
etype = "json";
|
||||
//etype = "json";
|
||||
switch_event_serialize_json(pevent, &listener->ebuf);
|
||||
} else {
|
||||
switch_xml_t xml;
|
||||
etype = "xml";
|
||||
//etype = "xml";
|
||||
|
||||
if ((xml = switch_event_xmlize(pevent, SWITCH_VA_NONE))) {
|
||||
listener->ebuf = switch_xml_toxml(xml, SWITCH_FALSE);
|
||||
|
||||
Reference in new issue
Block a user