summaryrefslogtreecommitdiffabout
path: root/lib
authorMichael Krelin <hacker@klever.net>2008-01-05 19:39:07 (UTC)
committer Michael Krelin <hacker@klever.net>2008-01-05 22:03:51 (UTC)
commit7bde7f66284b47a75bbceadc360e7f03550ace21 (patch) (unidiff)
tree401b24fc8b952fee21ad3dce117d4baf99048c9f /lib
parent8e3f9231383194d94e41032b64d87cc6ef1c2ee8 (diff)
downloadlibopkele-7bde7f66284b47a75bbceadc360e7f03550ace21.zip
libopkele-7bde7f66284b47a75bbceadc360e7f03550ace21.tar.gz
libopkele-7bde7f66284b47a75bbceadc360e7f03550ace21.tar.bz2
discovery: stop parser with XML_StopParser()
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'lib') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/discovery.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/discovery.cc b/lib/discovery.cc
index 81727c0..8729cfb 100644
--- a/lib/discovery.cc
+++ b/lib/discovery.cc
@@ -7,2 +7,3 @@
7#include <opkele/util.h> 7#include <opkele/util.h>
8#include <opkele/debug.h>
8 9
@@ -177,3 +178,7 @@ namespace opkele {
177 size_t bytes = s*nm; 178 size_t bytes = s*nm;
178 parse((const char *)p,bytes,false); 179 bool rp = parse((const char *)p,bytes,false);
180 if(!rp) {
181 skipping = -1;
182 bytes = 0;
183 }
179 return bytes; 184 return bytes;
@@ -227,3 +232,3 @@ namespace opkele {
227 }else{ 232 }else{
228 skipping = -1; 233 skipping = -1; stop_parser();
229 } 234 }
@@ -312,4 +317,5 @@ namespace opkele {
312 pt_stack.pop_back(); 317 pt_stack.pop_back();
313 if(status_code!=100) 318 if(status_code!=100) {
314 skipping = -1; 319 skipping = -1; stop_parser();
320 }
315 } 321 }
@@ -319,3 +325,3 @@ namespace opkele {
319 }else if((xmode&xmode_html) && is_element(n,"head")) { 325 }else if((xmode&xmode_html) && is_element(n,"head")) {
320 skipping = -1; 326 skipping = -1; stop_parser();
321 } 327 }
@@ -376,3 +382,3 @@ namespace opkele {
376 }else if(is_element(n,"body")) { 382 }else if(is_element(n,"body")) {
377 skipping = -1; 383 skipping = -1; stop_parser();
378 } 384 }