aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-06-21 18:39:32 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-06-21 18:39:32 +0200
commitb3a80630aa87ed6463288a1ae80f3d7b53b97c0a (patch)
tree181c160c4c12f62f217e94a451a03fa7a1a1e5f5
parent85cebbcfa236005daf91698ed38498fc2b206e7e (diff)
downloadxK-b3a80630aa87ed6463288a1ae80f3d7b53b97c0a.tar.gz
xK-b3a80630aa87ed6463288a1ae80f3d7b53b97c0a.tar.xz
xK-b3a80630aa87ed6463288a1ae80f3d7b53b97c0a.zip
degesch: change arguments to handle_buffer_close()
-rw-r--r--degesch.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/degesch.c b/degesch.c
index 4259d73..7e8b8b4 100644
--- a/degesch.c
+++ b/degesch.c
@@ -5913,14 +5913,14 @@ show_buffers_list (struct app_context *ctx)
}
static void
-handle_buffer_close (struct app_context *ctx, char *arguments)
+handle_buffer_close (struct app_context *ctx, struct handler_args *a)
{
struct buffer *buffer = NULL;
const char *which = NULL;
- if (!*arguments)
- buffer = ctx->current_buffer;
+ if (!*a->arguments)
+ buffer = a->buffer;
else
- buffer = try_decode_buffer (ctx, (which = cut_word (&arguments)));
+ buffer = try_decode_buffer (ctx, (which = cut_word (&a->arguments)));
if (!buffer)
buffer_send_error (ctx, NULL, "%s: %s", "No such buffer", which);
@@ -5959,10 +5959,9 @@ handle_command_buffer (struct app_context *ctx, struct handler_args *a)
// we will probably need to extend liberty for this
}
else if (!strcasecmp_ascii (action, "close"))
- handle_buffer_close (ctx, a->arguments);
+ handle_buffer_close (ctx, a);
else
return false;
-
return true;
}