Re: pwmd patch

Kalle Olavi Niemitalo <[email protected]>
Newsgroups gmane.comp.web.links
Message-ID <[email protected]>
Ben Kibbey <[email protected]> writes:

> +++ b/src/formhist/formhist.c

> @@ -355,7 +374,21 @@ get_form_history_value(unsigned char *url, unsigned char *name)

> +		 * FIXME If theres a pwmd error a message box pops up.
> +		 * src/viewer/text/form.c seems to call this repeatedly until
> +		 * it's satisfied with a value.
> +		 */

I think I fixed that in commit 0df5b7fdf5f819f03f33b5eb972c4880b35904d1.

> +++ b/src/formhist/pwmd.c

> +static void
> +show_error(int ret, int error)
> +{
> +    unsigned char *buf;
> +    struct terminal *term = terminals.prev;

Do not assume that terminals.prev is visible to the user, nor
that it is connected to the stdin/stdout of the elinks process.
Some of your other functions have similar assumptions.

Besides, your current libpwmd seems to block while waiting for
the user to type the password.  That would prevent ELinks from
serving slave terminals.

One solution might be to make ELinks fork a subprocess for the
libpwmd calls.  The stdin and stdout of this subprocess would be
pipes that the master ELinks process would forward to the slave
ELinks process serving the appropriate terminal.  But that might
require more extensive changes to ELinks than you have here;
all form-history operations might have to be made asynchronous
with completion callbacks.

_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev
signature.asc (application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGbYTFHm9IGt60eMgRAjkhAKCaYlugSqv+HIaGANXV3qvr75/raQCfc2sN
kZ3SOMPqMUWO1SyWFWUAfI0=
=Wen5
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.