#11 Not working on Nokia 6881

v0.5.4
closed-fixed
nobody
Core - Bugs (9)
7
2007-07-31
2007-07-30
No

A friend of mine reported a problem, which he can't use the ObexFTP front-end with a Nokia 6681 cell phone. In the configuration window, the connection test displays a connection error message.

Discussion

  • Daniel Fernandes Martins

    Logged In: YES
    user_id=1563482
    Originator: YES

    He sent me the ObexFTP XML response file and I figured that the XML document is invalid indeed! Here goes an example of ObexFTP response:

    <?xml version=" 1.0"?> <!-- notice the leading space in the version attribute -->
    <!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd"
    [ <!ATTLIST folder mem-type CDATA #IMPLIED>
    <!ATTLIST folder label CDATA #IMPLIED> ]>
    <folder-listing version=" 1.0"> <!-- again, the evil leading space -->
    <folder name="C:" user-perm="RW" mem-type="DEV" label="Phone memory"/>
    <folder name="E:" user-perm="RW" mem-type="MMC" label="Some card here"/>
    </folder-listing>

    It turns out that the JDOM parser gets confused when it tries to parse this XML, and it assumes that the XML is invalid.

     
  • Daniel Fernandes Martins

    • status: open --> open-accepted
     
  • Daniel Fernandes Martins

    Logged In: YES
    user_id=1563482
    Originator: YES

    I am designing a solution for this problem (and other similar problems that might be reported in the future). Now, I am finishing the implementation of a XML Post Processors chain which can be used to fix some problems like that.

    When the application starts, a chain object of those post processor is created. For now, we have only one processor (that addresses this bug), but similar classes can be easily created to solve other problems. Anyway, when the application gets a ObexFTP response, it will "filter" that response using the post processor chain to avoid parsing errors.

    I still don't know whether this behavior should be configurable. For now, the chain is created manualy and used to filter every single ObexFTP response.

    The code that solves this bug will be available in the source control in a couple of days.

     
  • Daniel Fernandes Martins

    Logged In: YES
    user_id=1563482
    Originator: YES

    Another issue was found in the ObexFTP response when using it with the Nokia 6881. I don't know why, but the XML file comes with a '\u0000' character at the end. Since this caractere is invalid (and it's in an invalid position anyway), the JDOM raises an exception.

     
  • Daniel Fernandes Martins

    • status: open-accepted --> closed-fixed
     
  • Daniel Fernandes Martins

    Logged In: YES
    user_id=1563482
    Originator: YES

    Ok, a fix to this bug is available in the source control.

     

Log in to post a comment.