summaryrefslogtreecommitdiff
path: root/wiretap/logcat_text.c
diff options
context:
space:
mode:
authormichal.orynicz <michal.orynicz@tieto.com>2016-01-12 14:28:47 +0100
committerAnders Broman <a.broman58@gmail.com>2016-01-13 07:36:44 +0000
commitc8a1f9d46ef3cb05f18bba07816ff9f5f6a5d53e (patch)
tree89a108cb261e0cd168dbbf2b512fc4968e7e21cd /wiretap/logcat_text.c
parentfda44fa1fd70cec4b47e11c959b2e04d62ebc0ce (diff)
downloadwireshark-c8a1f9d46ef3cb05f18bba07816ff9f5f6a5d53e.tar.gz
Fix issue with dumping to logcat_text from UPPER_PDU
When using UPPER_PDU to wrap logcat text data it was not possible to dump underlying data to logcat textfiles. Add ability to write it down properly. Change-Id: Ia20142cc340f34d80de93e213084cf1df83099d6 Reviewed-on: https://code.wireshark.org/review/13230 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wiretap/logcat_text.c')
-rw-r--r--wiretap/logcat_text.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wiretap/logcat_text.c b/wiretap/logcat_text.c
index e3c0811c4e..870121a76e 100644
--- a/wiretap/logcat_text.c
+++ b/wiretap/logcat_text.c
@@ -432,6 +432,17 @@ static gboolean logcat_text_dump_text(wtap_dumper *wdh,
switch (wdh->encap) {
case WTAP_ENCAP_WIRESHARK_UPPER_PDU:
+ {
+ gint skipped_length;
+
+ skipped_length = logcat_exported_pdu_length(pd);
+ pd += skipped_length;
+
+ if (!wtap_dump_file_write(wdh, (const gchar*) pd, phdr->caplen - skipped_length, err)) {
+ return FALSE;
+ }
+ }
+ break;
case WTAP_ENCAP_LOGCAT:
/* Skip EXPORTED_PDU*/
if (wdh->encap == WTAP_ENCAP_WIRESHARK_UPPER_PDU) {