Merge pull request #89 from ty4tw/develop

Update make codes simple #86
This commit is contained in:
Tomoaki Yamaguchi
2017-09-28 22:41:25 +09:00
committed by GitHub
2 changed files with 6 additions and 6 deletions

View File

@@ -62,14 +62,16 @@ $(SUBDIR)/MQTTSNUnsubscribeServer.c
CXX := g++
CPPFLAGS +=
INCLUDES += -I$(SRCDIR) \
INCLUDE :=
INCLUDES += $(INCLUDE) -I$(SRCDIR) \
-I$(SRCDIR)/$(OS) \
-I$(SRCDIR)/$(OS)/$(SENSORNET) \
-I$(SUBDIR) \
-I$(SRCDIR)/$(TEST)
DEFS :=
LIBS += -L/usr/local/lib
LIB :=
LIBS += $(LIB) -L/usr/local/lib
LDFLAGS :=
CXXFLAGS := -Wall -O3 -std=c++11
LDADD := -lpthread -lssl -lcrypto -lrt

View File

@@ -230,12 +230,10 @@ Client* ClientList::createClient(SensorNetAddress* addr, MQTTSNString* clientId,
else
{
MQTTSNString dummyId;
char* id = (char*)malloc(1);
*id = 0;
dummyId.cstring = id;
dummyId.cstring = strdup("");
dummyId.lenstring.len = 0;
client->setClientId(dummyId);
free(id);
free(dummyId.cstring);
}
/* add the list */