diff options
author | portix <portix@gmx.net> | 2011-12-29 23:20:50 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2011-12-29 23:20:50 +0100 |
commit | b4fa84e6f6261555dac61cf2e107da8a0ac7373c (patch) | |
tree | 079cbeb8cd7f68255f992a462297117288635e19 /src/commands.c | |
parent | 2e2a2e068740afa65f33c8903a28d120880c9911 (diff) | |
download | dwb-b4fa84e6f6261555dac61cf2e107da8a0ac7373c.zip |
New command 'allow_session_cookie_tmp'
--HG--
branch : experimental
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/commands.c b/src/commands.c index dced57c3..3aad54f3 100644 --- a/src/commands.c +++ b/src/commands.c @@ -210,10 +210,18 @@ commands_show_settings(KeyMap *km, Arg *arg) { /* commands_allow_cookie {{{*/ DwbStatus commands_allow_cookie(KeyMap *km, Arg *arg) { - if (arg->n == COOKIE_ALLOW_PERSISTENT) - dwb.fc.cookies_allow = dwb_soup_allow_cookie(dwb.fc.cookies_allow, dwb.files.cookies_allow, arg->n); - else - dwb.fc.cookies_session_allow = dwb_soup_allow_cookie(dwb.fc.cookies_session_allow, dwb.files.cookies_session_allow, arg->n); + switch (arg->n) { + case COOKIE_ALLOW_PERSISTENT: + return dwb_soup_allow_cookie(&dwb.fc.cookies_allow, dwb.files.cookies_allow, arg->n); + case COOKIE_ALLOW_SESSION: + return dwb_soup_allow_cookie(&dwb.fc.cookies_session_allow, dwb.files.cookies_session_allow, arg->n); + case COOKIE_ALLOW_SESSION_TMP: + dwb_soup_allow_cookie_tmp(); + break; + default: + break; + + } return STATUS_OK; }/*}}}*/ |