diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2012-12-02 16:32:59 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2012-12-02 16:32:59 +0000 |
commit | b0ee7200338e3bb41b1c770185f368f0345c2f55 (patch) | |
tree | dfac9b92a65f5fdc3dd5d158f203dcf4bd2f4ecd | |
parent | b3eee9b8d9fb2b1b41fe977fe6b97e3609f6bda8 (diff) |
Error handling fix in xmltree. Fixes a problem where if the start of the
stream is spread over two packets (or SSL records in this case), xt_handle()
would report a fatal error (which normally means the connection has failed
and should be abandoned immediately).
Returning 1 is likely more correct; just the fact that there's no data to
process yet is not a fatal failure.
This fixes potential issues with Google Talk when using OpenSSL (which
seems to be feeding data on record boundaries, even if additional records
have already been received).
-rw-r--r-- | lib/xmltree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/xmltree.c b/lib/xmltree.c index 3ecb2b93..f79c53da 100644 --- a/lib/xmltree.c +++ b/lib/xmltree.c @@ -162,9 +162,8 @@ int xt_handle( struct xt_parser *xt, struct xt_node *node, int depth ) xt_status st; int i; - /* Just in case someone likes infinite loops... */ if( xt->root == NULL ) - return 0; + return 1; if( node == NULL ) return xt_handle( xt, xt->root, depth ); |