yuanjianjiang / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

sendTextMessage sometimes appends a message header to the body of the text message #438

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
a) Before posting your issue you MUST answer to the questions otherwise it
will be rejected (invalid status) by us
b) Please check the issue tacker to avoid duplication
c) Please provide network capture (wireshark) or Android log (DDMS output)
if you want quick response

What steps will reproduce the problem?
1. Use NgnMessagingSession.createOutgoingSession.sendTextMessage

What is the expected output? What do you see instead?
Sometimes the ngn stack will tack another message onto the existing one.

For instance if:

The string you are sending is:

<?xml version="1.0" encoding="UTF-8"?><Commands Count="1" Agent="InsApp 
1.0.0"><Command Name="QueryDatabase"><Query Database="Ins" 
Response="ReportNotificationsRange">select * from Notifications where TimeUtc 
&gt; "2013-03-05T1:43:00Z" and rowid &gt;= 20 limit 
20</Query></Command></Commands>

Sometimes the sip server (freeswitch in this case) will see:

<?xml version="1.0" encoding="UTF-8"?><Commands Count="1" Agent="InsApp 
1.0.0"><Command Name="QueryDatabase"><Query Database="Ins" 
Response="ReportNotificationsRange">select * from Notifications where TimeUtc 
&gt; "2013-03-05T1:43:00Z" and rowid &gt;= 20 limit 
20</Query></Command></Commands>MESSAGE sip:ins_server@nbscab.org SIP/2.0
Via: SIP/2.0/TCP 192.168.1.6:57294;branch=z9hG4bK381342197;rport
From: <sip:quigley679@nbscab.org>;tag=1310373563
To: <sip:ins_server@nbscab.org>
Call-ID: 8cae''

As the message body.  Notice how after </Commands> it added MESSAGE...?  This 
was verified with tcpdump.

What version of the product are you using? On what operating system?
Android Ice Cream Sandwich

Please provide any additional information below.

This doesn't happen all the time.  I've verified that the correct string is 
being passed to sendTextMessage and that after that the wrong string gets sent 
over the wire.

Original issue reported on code.google.com by kjeremy@gmail.com on 6 Mar 2013 at 5:17