Re: [dev] [surf] [patch] Set cookiefile for new windows

From: Jack Murray <jack_AT_murray.cx>
Date: Tue, 9 Jul 2013 00:46:20 +1000

Oops, that introduces a bug because I forgot to increase the buffer size.
Let's try that again:

diff --git a/surf.c b/surf.c
index 53dda18..939a06f 100644
--- a/surf.c
+++ b/surf.c
_AT__AT_ -843,7 +843,7 @@ newclient(void) {
 static void
 newwindow(Client *c, const Arg *arg, gboolean noembed) {
        guint i = 0;
- const char *cmd[12], *uri;
+ const char *cmd[14], *uri;
        const Arg a = { .v = (void *)cmd };
        char tmp[64];

_AT__AT_ -865,6 +865,8 @@ newwindow(Client *c, const Arg *arg, gboolean noembed) {
                cmd[i++] = "-s";
        if(showxid)
                cmd[i++] = "-x";
+ cmd[i++] = "-c";
+ cmd[i++] = cookiefile;
        cmd[i++] = "--";
        uri = arg->v ? (char *)arg->v : c->linkhover;
        if(uri)



On Tue, Jul 9, 2013 at 12:44 AM, Jack Murray <jack_AT_murray.cx> wrote:

> diff --git a/surf.c b/surf.c
> index 53dda18..0f9b032 100644
> --- a/surf.c
> +++ b/surf.c
> _AT__AT_ -865,6 +865,8 @@ newwindow(Client *c, const Arg *arg, gboolean noembed)
> {
> cmd[i++] = "-s";
> if(showxid)
> cmd[i++] = "-x";
> + cmd[i++] = "-c";
> + cmd[i++] = cookiefile;
> cmd[i++] = "--";
> uri = arg->v ? (char *)arg->v : c->linkhover;
> if(uri)
>
>
Received on Mon Jul 08 2013 - 16:46:20 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 08 2013 - 16:48:11 CEST