Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#6113 closed defect (invalid)

Ad-Hoc commans don't works for mrim transport

Reported by: Dicson Owned by:
Priority: normal Milestone:
Component: Core Version: hg
Severity: normal Keywords:
Cc: Blocked By:
Blocking: OS: All

Description

Then I fill the form and press execute button - I have error: 'Service change the session identifier' xml log:

<!-- Out -->
<iq xmlns="jabber:client" to="fominde%mail.ru@mrim.jabber.ru" type="get" id="37">
<query xmlns="http://jabber.org/protocol/disco#items" node="http://jabber.org/protocol/commands" />
</iq>

<!-- In -->
<iq from='fominde%mail.ru@mrim.jabber.ru' to='222222245@jabber.ru/test' id='37' type='result'>
<query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands'>
<item node='conf_sms' jid='fominde%mail.ru@mrim.jabber.ru' name='Configure SMS'/>
<item node='send_sms' jid='fominde%mail.ru@mrim.jabber.ru' name='Send SMS'/>
</query>
</iq>

<!-- Out -->
<iq xmlns="jabber:client" to="fominde%mail.ru@mrim.jabber.ru" type="set" id="38">
<command xmlns="http://jabber.org/protocol/commands" node="send_sms" action="execute" />
</iq>

<!-- In -->
<iq from='fominde%mail.ru@mrim.jabber.ru' to='222222245@jabber.ru/test' id='38' type='result'>
<command status='executing' node='send_sms' sessionid='send_sms:1292513333.14' xmlns='http://jabber.org/protocol/commands'>
<x xmlns='jabber:x:data' type='form'>
<title>Отправка SMS</title>
<instructions>Формат номера: [страна][код][номер]. Например, +74951112233.</instructions>
<field var='number' type='list-single' label='Номер'>
<value>+79046112759</value>
<option label='+79046112759'>
<value>+79046112759</value>
</option>
<option label='+79046112760'>
<value>+79046112760</value>
</option>
</field>
<field var='text' type='text-multi' label='Текст'/>
<field var='translit' type='boolean' label='Автотранслит'>
<value>0</value>
</field>
</x>
</command>
</iq>

<!-- Out -->
<iq xmlns="jabber:client" to="fominde%mail.ru@mrim.jabber.ru" type="set" id="39">
<command xmlns="http://jabber.org/protocol/commands" node="send_sms" action="execute" sessionid="send_sms:1292513333.14">
<x xmlns="jabber:x:data" type="submit">
<field var="number" type="list-single">
<value>+79046112759</value>
<option label="+79046112759">
<value>+79046112759</value>
</option>
<option label="+79046112760">
<value>+79046112760</value>
</option>
</field>
<field var="text" type="text-multi">
<value>test</value>
</field>
</x>
</command>
</iq>

<!-- In -->
<iq from='fominde%mail.ru@mrim.jabber.ru' to='222222245@jabber.ru/test' id='39' type='result'>
<command status='executing' node='send_sms' sessionid='send_sms:1292513340.54' xmlns='http://jabber.org/protocol/commands'>
<x xmlns='jabber:x:data' type='form'>
<title>Отправка SMS</title>
<instructions>Формат номера: [страна][код][номер]. Например, +74951112233.</instructions>
<field var='number' type='list-single' label='Номер'>
<value>+79046112759</value>
<option label='+79046112759'>
<value>+79046112759</value>
</option>
<option label='+79046112760'>
<value>+79046112760</value>
</option>
</field>
<field var='text' type='text-multi' label='Текст'/>
<field var='translit' type='boolean' label='Автотранслит'>
<value>0</value>
</field>
</x>
</command>
</iq>

Transport does not work for two reasons:

1 We should not set the attribute "action" in the third request to the server (when we send the finished form)

2 We lost the third field(<field var='translit' type='boolean' label='Автотранслит'>) if value is 0 - it is removed, but 0 is not None!

Attachments (1)

patch.diff (1.2 KB) - added by Dicson 5 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 years ago by asterix

  • Resolution set to invalid
  • Status changed from new to closed

The reason of the failure is not in Gajim but in the transport. As error message says, the transport changes the sessionid value, and it should not. It passes from "send_sms:1292513333.14" to "send_sms:1292513340.54" without any reason.

Keeping action=execute is not a problem, it's the default action.

finally for the removed field, I don't think it's a problem because it's a boolean, and default value for boolean is False (see XEP-0004)

So there is no bug in Gajim, there is one in sessionid in the transport. (see also #3432)

comment:2 Changed 5 years ago by Dicson

Perhaps, but other clients are working with this transport without any problems

comment:3 Changed 5 years ago by asterix

Yes because they are more tolerant to this transport bug. But I think that it's not a good thing to have workarround for buggy transport. That will not force them to fix theyr code.

comment:4 Changed 5 years ago by Dicson

Ok. these transport use only the Russian users. If desired, they can apply the patch

comment:5 Changed 5 years ago by Yann Leboulanger <asterix@…>

(In [26932ac324f1]) don't remove false values from sent dataforms. Fixes #6765, see #6113

Changed 5 years ago by Dicson

comment:6 Changed 5 years ago by Dicson

patch updated. problem is partially solved in [26932ac324f1]

comment:7 Changed 5 years ago by Yann Leboulanger <asterix@…>

(In [375d3d2a65dc]) don't remove false values from sent dataforms. Fixes #6765, see #6113

Note: See TracTickets for help on using tickets.