mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Merge pull request #1886 from mcginty/mms-bad-pdu-logging
enable more verbose PDU parse logging
This commit is contained in:
commit
102b40543d
@ -22,6 +22,7 @@ import android.util.Log;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
import ws.com.google.android.mms.pdu.PduParser;
|
import ws.com.google.android.mms.pdu.PduParser;
|
||||||
import ws.com.google.android.mms.pdu.RetrieveConf;
|
import ws.com.google.android.mms.pdu.RetrieveConf;
|
||||||
@ -88,7 +89,7 @@ public class MmsDownloadHelper extends MmsCommunication {
|
|||||||
|
|
||||||
if (pdu != null) break;
|
if (pdu != null) break;
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
Log.w("MmsDownloadHelper", ioe);
|
Log.w(TAG, ioe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,6 +100,7 @@ public class MmsDownloadHelper extends MmsCommunication {
|
|||||||
RetrieveConf retrieved = (RetrieveConf)new PduParser(pdu).parse();
|
RetrieveConf retrieved = (RetrieveConf)new PduParser(pdu).parse();
|
||||||
|
|
||||||
if (retrieved == null) {
|
if (retrieved == null) {
|
||||||
|
Log.w(TAG, "Couldn't parse PDU, raw server response: " + Arrays.toString(pdu));
|
||||||
throw new IOException("Bad retrieved PDU");
|
throw new IOException("Bad retrieved PDU");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,8 +83,7 @@ public class PduParser {
|
|||||||
* The log tag.
|
* The log tag.
|
||||||
*/
|
*/
|
||||||
private static final String LOG_TAG = "PduParser";
|
private static final String LOG_TAG = "PduParser";
|
||||||
private static final boolean DEBUG = false;
|
private static final boolean LOCAL_LOGV = true;
|
||||||
private static final boolean LOCAL_LOGV = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
Loading…
Reference in New Issue
Block a user