freetalk-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freetalk-dev] address@hidden: patch about file transfer]


From: Anand Avati
Subject: [Freetalk-dev] address@hidden: patch about file transfer]
Date: Mon, 28 Aug 2006 10:20:00 -0700
User-agent: Mutt/1.5.9i

----- Forwarded message from Michael Scherer <address@hidden> -----

Envelope-to: address@hidden
Delivery-date: Mon, 28 Aug 2006 10:11:21 -0700
From: Michael Scherer <address@hidden>
To: address@hidden
Subject: patch about file transfer
Organization: Zarb.org
Cc: address@hidden, address@hidden
X-Virus-Scanned: by Network Services (Council of Europe)
X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on home.zresearch.com
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham 
        version=3.0.3

Hi.

It seems the file-transfer jep mandate the use of xmlns for the si element, 
which is not done by current stable code :

http://www.jabber.org/jeps/jep-0096.html

example 1 :

<iq type='set' id='offer1' to='address@hidden/resource'>
  <si xmlns='http://jabber.org/protocol/si' 
      id='a0'
      mime-type='text/plain'
      profile='http://jabber.org/protocol/si/profile/file-transfer'>
    <file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
          name='test.txt'
          size='1022'/>
    <feature xmlns='http://jabber.org/protocol/feature-neg'>
      <x xmlns='jabber:x:data' type='form'>
        <field var='stream-method' type='list-single'>
          
<option><value>http://jabber.org/protocol/bytestreams</value></option>
          <option><value>http://jabber.org/protocol/ibb</value></option>
        </field>
      </x>
    </feature>
  </si>
</iq>


freetalk currently lack  xmlns='http://jabber.org/protocol/si' in the si 
element when doing a file transfer initiation.

Here is a first patch to add it, it just add the needed xmlns.
I fear this part is missing elsewhere, but I didn't checked more, as I didn't 
found any other free client that implement this type of file transfer to test 
the code ( only a simple jabber bot I am writing on my free time, and that 
currently only check initiation ).

-- 
Michael Scherer

Index: src/file_transfer.cc
===================================================================
--- src/file_transfer.cc
+++ src/file_transfer.cc        2006-08-28 18:45:00.733876834 +0200
@@ -562,6 +562,7 @@
   
   child_node = lm_message_node_add_child (msg->node, "si", NULL);
   lm_message_node_set_attributes (child_node,
+                  "xmlns", "http://jabber.org/protocol/si";,
                                  "id", "a0",
                                  "mime-type", "text/plain",
                                  "profile", 
"http://jabber.org/protocol/si/profile/file-transfer";,


----- End forwarded message -----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]