Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/d34592848eb8307c1c872540c5bf0d0ef0de5825
...commit
http://git.netsurf-browser.org/netsurf.git/commit/d34592848eb8307c1c872540c5bf0d0ef0de5825
...tree
http://git.netsurf-browser.org/netsurf.git/tree/d34592848eb8307c1c872540c5bf0d0ef0de5825
The branch, ashmew2/nskolibrios has been updated
via d34592848eb8307c1c872540c5bf0d0ef0de5825 (commit)
via 91e299336c9255c73925163818cfdc58c63d083e (commit)
from 2e339adb391b947cc4805e2922e7c36624e0097c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=d34592848eb8307c1c872540c5bf0d0ef0de5825
commit d34592848eb8307c1c872540c5bf0d0ef0de5825
Author: Ashish Gupta <[email protected]>
Commit: Ashish Gupta <[email protected]>
Fix polling of http connections when going through linked list.
diff --git a/content/fetchers/httplib_kolibri.c
b/content/fetchers/httplib_kolibri.c
index 25e5a10..18055d1 100644
--- a/content/fetchers/httplib_kolibri.c
+++ b/content/fetchers/httplib_kolibri.c
@@ -13,11 +13,10 @@
#include "content/fetchers/httplib_kolibri.h"
#include "frontends/kolibrios/kolibri_http.h"
-extern struct fetch;
-
struct httpfetcher {
struct http_msg *handle;
struct fetch *owner;
+ nsurl *url;
bool headercbdone;
unsigned int datalen_cb_done;
@@ -45,7 +44,7 @@ void add_to_poll(struct httpfetcher *newfetcher) {
}
}
-void remove_from_poll(struct http_msg *donehttp) {
+struct httpfetcher* remove_from_poll(struct http_msg *donehttp) {
struct httpfetcher *t = head, *p = head;
LOG("-=- remove: (->handle) donehttp 0x%x", donehttp);
@@ -54,10 +53,12 @@ void remove_from_poll(struct http_msg *donehttp) {
if(t == head) {
p = t->next;
head = p;
+ return head;
break;
}
else {
p->next = t->next;
+ return t->next;
break;
}
}
@@ -65,6 +66,8 @@ void remove_from_poll(struct http_msg *donehttp) {
p = t;
t = t->next;
}
+
+ return head;
}
bool init_fetcher(lwc_string *scheme) {
@@ -252,6 +255,7 @@ void *setup_fetch(struct fetch *parent_fetch, struct nsurl
*url,
newfetcher->next = NULL;
newfetcher->handle = request;
+ newfetcher->url = url;
newfetcher->headercbdone = false;
newfetcher->owner = parent_fetch;
newfetcher->datalen_cb_done = 0;
@@ -299,6 +303,7 @@ void poll_fetch(lwc_string *scheme) {
LOG("--- Header Length: %d", t->handle->header_length);
LOG("--- Content starts at : %x", &(t->handle->content_ptr));
LOG("--- Content Length (received / total): %d / %d",
t->handle->content_received, t->handle->content_length);
+ LOG("--- ^ was for url : %s", nsurl_access(t->url));
int ret = http_receive_asm(t->handle);
@@ -352,9 +357,9 @@ void poll_fetch(lwc_string *scheme) {
fetch_msg msg;
msg.type = FETCH_NOTMODIFIED;
fetch_send_callback(&msg, t->owner);
- remove_from_poll(t->handle);
+ t = remove_from_poll(t->handle);
/* t = t->next; */
- t = head;
+ /* t = head; */
continue;
}
else {
@@ -372,9 +377,9 @@ void poll_fetch(lwc_string *scheme) {
LOG("---- [3xx] : Redirect to %s", msg.data.redirect);
fetch_send_callback(&msg, t->owner);
t->headercbdone = true;
- remove_from_poll(t->handle);
+ t = remove_from_poll(t->handle);
/* t = t->next; */
- t = head;
+ /* t = head; */
continue;
}
}
@@ -384,11 +389,11 @@ void poll_fetch(lwc_string *scheme) {
LOG(" ---- [ERROR] Unhandled HTTP Code : %d", t->handle->status);
fetch_send_callback(&msg, t->owner);
t->headercbdone = true;
- remove_from_poll(t->handle);
fetch_remove_from_queues(t->owner);
fetch_free(t->owner);
+ t = remove_from_poll(t->handle);
/* t = t->next; */
- t = head;
+ /* t = head; */
continue;
}
}
@@ -430,19 +435,17 @@ void poll_fetch(lwc_string *scheme) {
LOG("---- FETCH_FINISHED for fetch 0x%x", t->owner);
struct httpfetcher *tnext = t->next;
- remove_from_poll(t->handle);
fetch_remove_from_queues(t->owner);
fetch_free(t->owner);
- t = head;
- /* t = tnext; */
+ /* t = head; */
+ t = remove_from_poll(t->handle);
+ /* t = next; */
continue;
}
LOG("Main loop: t going from 0x%x to 0x%x", t->owner, t->next != NULL ?
t->next->owner : NULL);
t = t->next;
}
-
- LOG("=Returning from %s", __func__);
}
void finalize_fetcher(lwc_string *scheme) {
diff --git a/frontends/kolibrios/schedule.c b/frontends/kolibrios/schedule.c
index 0426478..a0d9da0 100644
--- a/frontends/kolibrios/schedule.c
+++ b/frontends/kolibrios/schedule.c
@@ -108,7 +108,7 @@ nserror framebuffer_schedule(int tival, void
(*callback)(void *p), void *p)
return ret;
}
- LOG("Adding %p(%p) in %d", callback, p, tival);
+ /* LOG("Adding %p(%p) in %d", callback, p, tival); */
nscb = calloc(1, sizeof(struct nscallback));
nscb->tv = get_tick_count() + tival / 10;
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=91e299336c9255c73925163818cfdc58c63d083e
commit 91e299336c9255c73925163818cfdc58c63d083e
Author: Ashish Gupta <[email protected]>
Commit: Ashish Gupta <[email protected]>
Handle HOME and END keys in framebuffer
diff --git a/frontends/framebuffer/fbtk/text.c
b/frontends/framebuffer/fbtk/text.c
index 31417c2..4f3a238 100644
--- a/frontends/framebuffer/fbtk/text.c
+++ b/frontends/framebuffer/fbtk/text.c
@@ -388,6 +388,22 @@ text_input(fbtk_widget_t *widget, fbtk_callback_info *cbi)
}
break;
+ case NSFB_KEY_HOME:
+ if (widget->u.text.idx > 0) {
+ widget->u.text.idx = 0;
+
+ caret_moved = true;
+ }
+ break;
+
+ case NSFB_KEY_END:
+ if (widget->u.text.idx < widget->u.text.len) {
+ widget->u.text.idx = widget->u.text.len;
+
+ caret_moved = true;
+ }
+ break;
+
case NSFB_KEY_PAGEUP:
case NSFB_KEY_PAGEDOWN:
case NSFB_KEY_UP:
-----------------------------------------------------------------------
Summary of changes:
content/fetchers/httplib_kolibri.c | 31 +++++++++++++++++--------------
frontends/framebuffer/fbtk/text.c | 16 ++++++++++++++++
frontends/kolibrios/schedule.c | 2 +-
3 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/content/fetchers/httplib_kolibri.c
b/content/fetchers/httplib_kolibri.c
index 25e5a10..18055d1 100644
--- a/content/fetchers/httplib_kolibri.c
+++ b/content/fetchers/httplib_kolibri.c
@@ -13,11 +13,10 @@
#include "content/fetchers/httplib_kolibri.h"
#include "frontends/kolibrios/kolibri_http.h"
-extern struct fetch;
-
struct httpfetcher {
struct http_msg *handle;
struct fetch *owner;
+ nsurl *url;
bool headercbdone;
unsigned int datalen_cb_done;
@@ -45,7 +44,7 @@ void add_to_poll(struct httpfetcher *newfetcher) {
}
}
-void remove_from_poll(struct http_msg *donehttp) {
+struct httpfetcher* remove_from_poll(struct http_msg *donehttp) {
struct httpfetcher *t = head, *p = head;
LOG("-=- remove: (->handle) donehttp 0x%x", donehttp);
@@ -54,10 +53,12 @@ void remove_from_poll(struct http_msg *donehttp) {
if(t == head) {
p = t->next;
head = p;
+ return head;
break;
}
else {
p->next = t->next;
+ return t->next;
break;
}
}
@@ -65,6 +66,8 @@ void remove_from_poll(struct http_msg *donehttp) {
p = t;
t = t->next;
}
+
+ return head;
}
bool init_fetcher(lwc_string *scheme) {
@@ -252,6 +255,7 @@ void *setup_fetch(struct fetch *parent_fetch, struct nsurl
*url,
newfetcher->next = NULL;
newfetcher->handle = request;
+ newfetcher->url = url;
newfetcher->headercbdone = false;
newfetcher->owner = parent_fetch;
newfetcher->datalen_cb_done = 0;
@@ -299,6 +303,7 @@ void poll_fetch(lwc_string *scheme) {
LOG("--- Header Length: %d", t->handle->header_length);
LOG("--- Content starts at : %x", &(t->handle->content_ptr));
LOG("--- Content Length (received / total): %d / %d",
t->handle->content_received, t->handle->content_length);
+ LOG("--- ^ was for url : %s", nsurl_access(t->url));
int ret = http_receive_asm(t->handle);
@@ -352,9 +357,9 @@ void poll_fetch(lwc_string *scheme) {
fetch_msg msg;
msg.type = FETCH_NOTMODIFIED;
fetch_send_callback(&msg, t->owner);
- remove_from_poll(t->handle);
+ t = remove_from_poll(t->handle);
/* t = t->next; */
- t = head;
+ /* t = head; */
continue;
}
else {
@@ -372,9 +377,9 @@ void poll_fetch(lwc_string *scheme) {
LOG("---- [3xx] : Redirect to %s", msg.data.redirect);
fetch_send_callback(&msg, t->owner);
t->headercbdone = true;
- remove_from_poll(t->handle);
+ t = remove_from_poll(t->handle);
/* t = t->next; */
- t = head;
+ /* t = head; */
continue;
}
}
@@ -384,11 +389,11 @@ void poll_fetch(lwc_string *scheme) {
LOG(" ---- [ERROR] Unhandled HTTP Code : %d", t->handle->status);
fetch_send_callback(&msg, t->owner);
t->headercbdone = true;
- remove_from_poll(t->handle);
fetch_remove_from_queues(t->owner);
fetch_free(t->owner);
+ t = remove_from_poll(t->handle);
/* t = t->next; */
- t = head;
+ /* t = head; */
continue;
}
}
@@ -430,19 +435,17 @@ void poll_fetch(lwc_string *scheme) {
LOG("---- FETCH_FINISHED for fetch 0x%x", t->owner);
struct httpfetcher *tnext = t->next;
- remove_from_poll(t->handle);
fetch_remove_from_queues(t->owner);
fetch_free(t->owner);
- t = head;
- /* t = tnext; */
+ /* t = head; */
+ t = remove_from_poll(t->handle);
+ /* t = next; */
continue;
}
LOG("Main loop: t going from 0x%x to 0x%x", t->owner, t->next != NULL ?
t->next->owner : NULL);
t = t->next;
}
-
- LOG("=Returning from %s", __func__);
}
void finalize_fetcher(lwc_string *scheme) {
diff --git a/frontends/framebuffer/fbtk/text.c
b/frontends/framebuffer/fbtk/text.c
index 31417c2..4f3a238 100644
--- a/frontends/framebuffer/fbtk/text.c
+++ b/frontends/framebuffer/fbtk/text.c
@@ -388,6 +388,22 @@ text_input(fbtk_widget_t *widget, fbtk_callback_info *cbi)
}
break;
+ case NSFB_KEY_HOME:
+ if (widget->u.text.idx > 0) {
+ widget->u.text.idx = 0;
+
+ caret_moved = true;
+ }
+ break;
+
+ case NSFB_KEY_END:
+ if (widget->u.text.idx < widget->u.text.len) {
+ widget->u.text.idx = widget->u.text.len;
+
+ caret_moved = true;
+ }
+ break;
+
case NSFB_KEY_PAGEUP:
case NSFB_KEY_PAGEDOWN:
case NSFB_KEY_UP:
diff --git a/frontends/kolibrios/schedule.c b/frontends/kolibrios/schedule.c
index 0426478..a0d9da0 100644
--- a/frontends/kolibrios/schedule.c
+++ b/frontends/kolibrios/schedule.c
@@ -108,7 +108,7 @@ nserror framebuffer_schedule(int tival, void
(*callback)(void *p), void *p)
return ret;
}
- LOG("Adding %p(%p) in %d", callback, p, tival);
+ /* LOG("Adding %p(%p) in %d", callback, p, tival); */
nscb = calloc(1, sizeof(struct nscallback));
nscb->tv = get_tick_count() + tival / 10;
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org