From b0ee7200338e3bb41b1c770185f368f0345c2f55 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 2 Dec 2012 16:32:59 +0000 Subject: 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). --- lib/xmltree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/xmltree.c') 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 ); -- cgit v1.2.3