From ff26e14eede61e5873120402c24f750116818cfc Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 10 Aug 2017 19:46:33 +0200 Subject: [PATCH 1/2] api: fix shutdown of half-established connections (closes #115) --- lib/api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/api.c b/lib/api.c index ebca6d24a..5fe95dfa8 100644 --- a/lib/api.c +++ b/lib/api.c @@ -150,6 +150,9 @@ int api_http_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, void break; case LWS_CALLBACK_CLOSED_HTTP: + if (!s) + return -1; + ret = api_session_destroy(s); if (ret) return -1; From f7d263eaf4b053ae838b4fd4f2b7af207b560b6e Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 10 Aug 2017 19:47:02 +0200 Subject: [PATCH 2/2] fix Makefile to correctly get latest Git version tag --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e43e2a5ca..07dd7ff9b 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ SRCDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) VPATH = $(SRCDIR) # Add git revision and build variant defines -VERSION := $(shell git describe --tags --abbrev=0 --match v*) +VERSION := $(shell git describe --tags --abbrev=0 --match 'v*') VERSION_NUM := $(shell VERSION=$(VERSION); echo $${VERSION:1}) ifdef CI