From 79a3ca34c493093bf762559831478aaaac3a5323 Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Tue, 9 Dec 2014 00:53:16 -0500 Subject: [PATCH] Fix error message on invalid receipt --- stomp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stomp.c b/stomp.c index b68acc6..cacefbb 100644 --- a/stomp.c +++ b/stomp.c @@ -645,7 +645,6 @@ stomp_frame_t *stomp_read_frame(stomp_t *stomp) */ int stomp_valid_receipt(stomp_t *stomp, stomp_frame_t *frame) { int success = 1; - char error[1024]; char *receipt = NULL; if (zend_hash_find(frame->headers, "receipt", sizeof("receipt"), (void **)&receipt) == SUCCESS) { @@ -661,7 +660,7 @@ int stomp_valid_receipt(stomp_t *stomp, stomp_frame_t *frame) { && !strcmp(receipt, receipt_id)) { success = 1; } else { - stomp_set_error(stomp, error, 0, "%s", receipt_id); + stomp_set_error(stomp, "Invalid receipt", 0, "%s", receipt_id); } stomp_free_frame(res); stomp->frame_stack = stack;