netd: BandwidthController: return extra info on gettetherstats failure
Use the error message string to report the raw parsed data in case of
failure.
Bug:5543131
Change-Id: If9f3bcea09fd3ab8a506955d8153b3430bfd239c
diff --git a/BandwidthController.h b/BandwidthController.h
index 861c63e..1aa19e5 100644
--- a/BandwidthController.h
+++ b/BandwidthController.h
@@ -75,7 +75,7 @@
* stats should have ifaceIn and ifaceOut initialized.
* Byte counts should be left to the default (-1).
*/
- int getTetherStats(TetherStats &stats);
+ int getTetherStats(TetherStats &stats, std::string &extraProcessingInfo);
protected:
class QuotaInfo {
@@ -122,8 +122,10 @@
/*
* stats should have ifaceIn and ifaceOut initialized.
* fp should be a file to the FORWARD rules of iptables.
+ * extraProcessingInfo: contains raw parsed data, and error info.
*/
- static int parseForwardChainStats(TetherStats &stats, FILE *fp);
+ static int parseForwardChainStats(TetherStats &stats, FILE *fp,
+ std::string &extraProcessingInfo);
/*------------------*/