fix multi-message aspect of smsproto

passes --run-sms-test now, and works on Android occasionally combining messages.
This commit is contained in:
Eric House 2019-03-21 18:42:58 -07:00
parent ea1cc68eb0
commit 8a620533e5
2 changed files with 9 additions and 8 deletions

View file

@ -397,6 +397,8 @@ public class SMSService extends XWJIService {
sendBuffers( msgs, toPhone ); sendBuffers( msgs, toPhone );
} }
if ( waitSecs > 0 ) { if ( waitSecs > 0 ) {
// PENDING
Log.d( TAG, "calling postResend(), but might want to avoid enqueueWork!" );
postResend( toPhone, waitSecs ); postResend( toPhone, waitSecs );
} }
} }

View file

@ -35,7 +35,6 @@
/* To match the SMSService format */ /* To match the SMSService format */
#define SMS_PROTO_VERSION_JAVA 1 #define SMS_PROTO_VERSION_JAVA 1
#define SMS_PROTO_VERSION_COMBO 2 #define SMS_PROTO_VERSION_COMBO 2
# define SMS_PROTO_VERSION SMS_PROTO_VERSION_JAVA
#define PARTIALS_FORMAT 0 #define PARTIALS_FORMAT 0
@ -831,7 +830,7 @@ toNetMsgs( SMSProto* state, ToPhoneRec* rec, XP_Bool forceOld )
SMSMsgNet newMsg = { .len = useLen + 4, SMSMsgNet newMsg = { .len = useLen + 4,
.data = XP_MALLOC( state->mpool, useLen + 4 ) .data = XP_MALLOC( state->mpool, useLen + 4 )
}; };
newMsg.data[0] = SMS_PROTO_VERSION; newMsg.data[0] = SMS_PROTO_VERSION_JAVA;
newMsg.data[1] = msgID; newMsg.data[1] = msgID;
newMsg.data[2] = indx; newMsg.data[2] = indx;
newMsg.data[3] = count; newMsg.data[3] = count;