Fix error message on invalid receipt

v1.1
Pierrick Charron 2014-12-09 00:53:16 -05:00
parent 5024fff376
commit 79a3ca34c4
1 changed files with 1 additions and 2 deletions

View File

@ -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;