Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89b5ba54 authored by Vineeta Srivastava's avatar Vineeta Srivastava Committed by Android Git Automerger
Browse files

am e7ca493c: Merge "SAP: Do not send padding when packet size is mutiple of 4" into mnc-dr-dev

* commit 'e7ca493c':
  SAP: Do not send padding when packet size is mutiple of 4
parents 9f687e85 e7ca493c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -643,10 +643,12 @@ public class SapMessage {

        /* Payload */
        os.write(value);
        for(int i = 0, n = 4 - (value.length % 4) ; i < n; i++) {
        if (value.length % 4 != 0) {
            for (int i = 0; i < (4 - (value.length % 4)); ++i) {
                os.write(0); // Padding
            }
        }
    }

    public void write(OutputStream os) throws IOException {
        /* Write the header */