From bbcea40415b7c65427b902443028f65f79457265 Mon Sep 17 00:00:00 2001 From: Anthony Alba Date: Tue, 13 Mar 2018 08:07:26 +0800 Subject: [PATCH] recording.c: save the label in pcap metadata file label in ng-protocol can be used by SIP proxy to send additional metadata. Write out label to pcap metadata file. --- daemon/recording.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/recording.c b/daemon/recording.c index 9c4264c88..5b5a43cc5 100644 --- a/daemon/recording.c +++ b/daemon/recording.c @@ -350,6 +350,9 @@ static void sdp_after_pcap(struct recording *recording, GString *str, struct cal // File pointers buffer data, whereas direct writing using the file // descriptor does not. Make sure to flush any unwritten contents // so the file contents appear in order. + if (ml->label.len) { + fprintf(meta_fp, "\nLabel: %*s", ml->label.len, ml->label.s); + } fprintf(meta_fp, "\nSDP mode: "); fprintf(meta_fp, "%s", get_opmode_text(opmode)); fprintf(meta_fp, "\nSDP before RTP packet: %" PRIu64 "\n\n", recording->u.pcap.packet_num);