Author: jmb
Date: Wed Oct 14 20:49:43 2009
New Revision: 9644
URL:
http://source.netsurf-browser.org?rev=9644&view=rev
Log:
Don't print notification of progress events -- it's just noise.
Attempt to fetch a second object from the cache.
Modified:
branches/jmb/new-cache/test/llcache.c
Modified: branches/jmb/new-cache/test/llcache.c
URL:
http://source.netsurf-browser.org/branches/jmb/new-cache/test/llcache.c?r...
==============================================================================
--- branches/jmb/new-cache/test/llcache.c (original)
+++ branches/jmb/new-cache/test/llcache.c Wed Oct 14 20:49:43 2009
@@ -111,7 +111,8 @@
};
bool *done = pw;
- fprintf(stdout, "%p : %s\n", handle, event_names[event->type]);
+ if (event->type != LLCACHE_EVENT_PROGRESS)
+ fprintf(stdout, "%p : %s\n", handle, event_names[event->type]);
/* Inform main() that the fetch completed */
if (event->type == LLCACHE_EVENT_DONE)
@@ -124,6 +125,7 @@
{
nserror error;
llcache_handle *handle;
+ llcache_handle *handle2;
bool done = false;
/* Initialise subsystems */
@@ -152,7 +154,22 @@
llcache_poll();
}
+ done = false;
+ error =
llcache_handle_retrieve("http://www.netsurf-browser.org/",
+ LLCACHE_RETRIEVE_VERIFIABLE, NULL, NULL,
+ event_handler, &done, &handle2);
+ if (error != NSERROR_OK) {
+ fprintf(stderr, "llcache_handle_retrieve: %d\n", error);
+ return 1;
+ }
+
+ while (done == false) {
+ fetch_poll();
+ llcache_poll();
+ }
+
/* Cleanup */
+ llcache_handle_release(handle2);
llcache_handle_release(handle);
fetch_quit();