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

Commit adf3d305 authored by Zhang Fang's avatar Zhang Fang Committed by Steve Kondik
Browse files

MMS: Fix issue that backup MMS from operators failed.

When receiving MMS from operators server number, it will save
 in part table with both name and content location as null.

Add the check of content ID when making the PDU body, so as
 to make sure either the name, file name, content location/ID
 of the PDU part is not null. Otherwise, return ERROR.

Change-Id: Ie8067c4abc4e52d70d11b8c7b615d2664353ba5a
CRs-Fixed: 650563
parent c86d9b11
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -949,13 +949,16 @@ public class PduComposer {
                    name = part.getContentLocation();
                    name = part.getContentLocation();


                    if (null == name) {
                    if (null == name) {
                        /* at lease one of name, filename, Content-location
                        name = part.getContentId();
                         * should be available.

                         */
                        if (null == name) {
                            // At lease one of name, filename, Content-location, Content id
                            // should be available.
                            return PDU_COMPOSE_CONTENT_ERROR;
                            return PDU_COMPOSE_CONTENT_ERROR;
                        }
                        }
                    }
                    }
                }
                }
            }
            appendOctet(PduPart.P_DEP_NAME);
            appendOctet(PduPart.P_DEP_NAME);
            appendTextString(name);
            appendTextString(name);