From 3b36b594f3b2c0b05d75843c6d801becf54c5f86 Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Sun, 8 Oct 2017 21:50:46 +0200 Subject: Fix debug. When rebasing, do not preserve --- content/fetchers/httplib_kolibri.c | 4 +-- frontends/kolibrios/browser_table.h | 57 ------------------------------------- 2 files changed, 2 insertions(+), 59 deletions(-) delete mode 100644 frontends/kolibrios/browser_table.h diff --git a/content/fetchers/httplib_kolibri.c b/content/fetchers/httplib_kolibri.c index 1aae7e583..25e5a1060 100644 --- a/content/fetchers/httplib_kolibri.c +++ b/content/fetchers/httplib_kolibri.c @@ -276,7 +276,6 @@ bool abort_fetch(void *httpf) { bool free_fetch(void *httpf) { LOG("free_fetch called for 0x%x", ((struct httpfetcher *)httpf)->owner); - debug_board_printf("Closing http connection in free_fetch\n"); http_disconnect_asm((((struct httpfetcher *)httpf)->handle)); LOG("Freeing fetch 0x%x", ((struct httpfetcher *)httpf)->owner); @@ -399,10 +398,11 @@ void poll_fetch(lwc_string *scheme) { } else if(ret == -1) { /* If data was received send it to netsurf core with FETCH_DATA */ - LOG("Doing a data callback; so far : %u vs %u!", t->datalen_cb_done, t->handle->content_received); + LOG("Calledback vs received : %u vs %u!", t->datalen_cb_done, t->handle->content_received); if(t->handle->content_received > t->datalen_cb_done) { fetch_msg msg; + LOG("Doing a data callback\n"); msg.type = FETCH_DATA; msg.data.header_or_data.buf = (const uint8_t *) (t->handle->content_ptr + t->datalen_cb_done); msg.data.header_or_data.len = t->handle->content_received - t->datalen_cb_done; diff --git a/frontends/kolibrios/browser_table.h b/frontends/kolibrios/browser_table.h deleted file mode 100644 index 2ee11826b..000000000 --- a/frontends/kolibrios/browser_table.h +++ /dev/null @@ -1,57 +0,0 @@ -/* ------------------------------ */ -/* Part about Browser table. Will contain all functions required as well. */ -/* ------------------------------ */ -nserror kolibri_schedule_cb(int t, void (*callback)(void *p), void *p); -void kolibri_browser_quit(void); - -struct kolibri_callback { - void (*cb)(void *p); - void *arg; - struct kolibri_callback *next_cb; -} head_dummy; - -struct kolibri_callback *kcb_head = &head_dummy; -struct kolibri_callback *kcb_tail = &head_dummy; - -static struct gui_browser_table kolibri_browser_table = { - .schedule = kolibri_schedule_cb, - .quit = kolibri_browser_quit, - }; - -nserror kolibri_schedule_cb(int t, void (*callback)(void *p), void *p) -{ - /* debug_board_write_str("kolibri_schedule_cb called!\n"); */ - struct kolibri_callback *new_cb = malloc(sizeof(struct kolibri_callback)); - new_cb->arg = p; - new_cb->cb = callback; - new_cb->next_cb = NULL; - - kcb_tail -> next_cb = new_cb; - kcb_tail = new_cb; - - return NSERROR_OK; -} - -bool kolibri_schedule_run(void) -{ - if(kcb_head != kcb_tail) - return false; - - struct kolibri_callback *runner = kcb_head -> next_cb; - - while(runner != NULL) - { - runner->cb(runner->arg); - runner = runner -> next_cb; - } - - return true; - /* TODO: Free the whole list of callbacks */ -} - -void kolibri_browser_quit(void) -{ - debug_board_write_str("Netsurf is shutting down Normally..GoodBye."); - /* TODO: Do the actual killing of process with mcall -1 */ - /* Maybe set Kolibri_quit = 1 here */ -} -- cgit v1.2.3