Menu

#159 Bad reply format from daemon ?

closed-invalid
nobody
None
5
2005-11-25
2005-11-25
Anonymous
No

In the file: lib/interface.c
For the function: static void appendnode (String *s,
char *key, char *value)

If value is non null, the result is: "key(value) "
But when value is null or is just a empty string, the
result is: "key "
Shouldn't it be something like: "key() " ?

When sending ITEM replies for a FastTrack search for
example, the node field is undefined so giFT will say:

ITEM (session-id)
user (username)
node
availability (availability)
/* some fields have been deleted here */
;

Which is a bit harder to parse than:

ITEM (session-id)
user (username)
node ()
availability (availability)
/* some fields have been deleted here */
;

Discussion

  • Markus Kern

    Markus Kern - 2005-11-25
    • status: open --> closed-invalid
     
  • Markus Kern

    Markus Kern - 2005-11-25

    Logged In: YES
    user_id=552604

    The interface spec at http://gift.sourceforge.net/docs/0.11.
    x/interface.html states:
    'A key often has a value, in the form of an argument, but
    this is not required.'

    Although in this particular case one could argue that the
    node key should be completely missing if it does not contain
    a useful value.

    But since current versions of giFT will be around for a
    while you will have to handle this case if you are writing a
    front end.

     

Log in to post a comment.