Skip to content

Commit

Permalink
incorrect exit out of switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kraynyukhov committed May 17, 2018
1 parent a3a5239 commit 3260774
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 13 deletions.
11 changes: 2 additions & 9 deletions include/WebSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,24 +167,17 @@ template <bool TLSEnable=false, bool StatsEnable=false> class WebSocket

const bool handleInput()
{
try_again:
int received=this->recv(mInBuffer,MSG_NOSIGNAL);
switch(received)
{
case -1:
if(errno != EAGAIN)
{
goto try_again;
return false;
}
return false;
return true;
default:
this->processInput(mInBuffer,received);
/*
if(mStats.mOutCMASize>0)
{
streamProcessor.setMessageBufferSize(mStats.mOutCMASize*1.3);
}
**/
return true;
}
}
Expand Down
6 changes: 3 additions & 3 deletions nbproject/Makefile-Debug.mk
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/lapps: ../utils/dist/Debug/GNU-Linux/

${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/lapps: ${OBJECTFILES}
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
g++ -pipe -Wall -pthread -O2 -mtune=native -march=native -fPIC -fstack-check -fstack-protector-strong -mfpmath=sse -msse2avx -ftree-vectorize -funroll-loops -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/lapps ${OBJECTFILES} ${LDLIBSOPTIONS} -lcryptopp -ltls -lcrypto -lluajit-5.1
g++ -pipe -Wall -pthread -O2 -mtune=native -march=native -fPIC -fstack-check -fstack-protector-strong -mfpmath=sse -msse2avx -ftree-vectorize -funroll-loops -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/lapps ${OBJECTFILES} ${LDLIBSOPTIONS} -latomic -lcryptopp -ltls -lcrypto -lluajit-5.1

${OBJECTDIR}/src/getLog.o: src/getLog.cpp nbproject/Makefile-${CND_CONF}.mk
${MKDIR} -p ${OBJECTDIR}/src
${RM} "$@.d"
$(COMPILE.cc) -g -DAPP_NAME=\"LAppS\" -DLOG_FILE=\"lapps.log\" -DLOG_INFO -DMAX_BUFF_SIZE=512 -DSTATS_ENABLE -DTSAFE_LOG=1 -DLAPPS_TLS_ENABLE -I../libressl/include -I../ITCFramework/include -I../ITCLib/include -I../utils/include -Iinclude -Iinclude/modules -I/usr/local/include -I/usr/local/include/luajit-2.0 -std=c++14 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/src/getLog.o src/getLog.cpp
$(COMPILE.cc) -g -DAPP_NAME=\"LAppS\" -DLAPPS_TLS_ENABLE -DLOG_FILE=\"lapps.log\" -DLOG_INFO -DMAX_BUFF_SIZE=512 -DSTATS_ENABLE -DTSAFE_LOG=1 -I../libressl/include -I../ITCFramework/include -I../ITCLib/include -I../utils/include -Iinclude -Iinclude/modules -I/usr/local/include -I/usr/local/include/luajit-2.0 -std=c++14 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/src/getLog.o src/getLog.cpp

${OBJECTDIR}/src/main.o: src/main.cpp nbproject/Makefile-${CND_CONF}.mk
${MKDIR} -p ${OBJECTDIR}/src
${RM} "$@.d"
$(COMPILE.cc) -g -DAPP_NAME=\"LAppS\" -DLOG_FILE=\"lapps.log\" -DLOG_INFO -DMAX_BUFF_SIZE=512 -DSTATS_ENABLE -DTSAFE_LOG=1 -DLAPPS_TLS_ENABLE -I../libressl/include -I../ITCFramework/include -I../ITCLib/include -I../utils/include -Iinclude -Iinclude/modules -I/usr/local/include -I/usr/local/include/luajit-2.0 -std=c++14 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/src/main.o src/main.cpp
$(COMPILE.cc) -g -DAPP_NAME=\"LAppS\" -DLAPPS_TLS_ENABLE -DLOG_FILE=\"lapps.log\" -DLOG_INFO -DMAX_BUFF_SIZE=512 -DSTATS_ENABLE -DTSAFE_LOG=1 -I../libressl/include -I../ITCFramework/include -I../ITCLib/include -I../utils/include -Iinclude -Iinclude/modules -I/usr/local/include -I/usr/local/include/luajit-2.0 -std=c++14 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/src/main.o src/main.cpp

# Subprojects
.build-subprojects:
Expand Down
8 changes: 8 additions & 0 deletions nbproject/Package-Debug.bash
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ cd "${TOP}"
makeDirectory "${NBTMPDIR}//usr/bin"
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755

cd "${TOP}"
makeDirectory "${NBTMPDIR}//usr/bin"
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755

cd "${TOP}"
makeDirectory "${NBTMPDIR}//usr/bin"
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755


# Create control file
cd "${TOP}"
Expand Down
14 changes: 13 additions & 1 deletion nbproject/configurations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
</makeArtifact>
</linkerLibProjectItem>
</linkerLibItems>
<commandLine>-lcryptopp -ltls -lcrypto -lluajit-5.1</commandLine>
<commandLine>-latomic -lcryptopp -ltls -lcrypto -lluajit-5.1</commandLine>
</linkerTool>
<requiredProjects>
<makeArtifact PL="../utils"
Expand Down Expand Up @@ -504,6 +504,18 @@
perm="755"
owner="root"
group="bin"/>
<packFileListElem type="File"
to="${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}"
from="${OUTPUT_PATH}"
perm="755"
owner="root"
group="bin"/>
<packFileListElem type="File"
to="${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}"
from="${OUTPUT_PATH}"
perm="755"
owner="root"
group="bin"/>
</packFileList>
<packInfoList>
<packInfoListElem name="Package" value="lapps" mandatory="true"/>
Expand Down
5 changes: 5 additions & 0 deletions nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/pk/workspace/docker/luadev.env/workspace/LAppS/include/Config.h</file>
<file>file:/home/pk/workspace/docker/luadev.env/workspace/LAppS/include/abstract/Worker.h</file>
<file>file:/home/pk/workspace/docker/luadev.env/workspace/LAppS/include/IOWorker.h</file>
<file>file:/home/pk/workspace/docker/luadev.env/workspace/LAppS/include/EventBus.h</file>
<file>file:/home/pk/workspace/docker/luadev.env/workspace/LAppS/include/Shakespeer.h</file>
<file>file:/home/pk/workspace/docker/luadev.env/workspace/LAppS/include/modules/wsSend.h</file>
<file>file:/home/pk/workspace/docker/luadev.env/workspace/LAppS/include/WebSocket.h</file>
<file>file:/home/pk/workspace/docker/luadev.env/workspace/LAppS/include/WSConnectionStats.h</file>
</group>
</open-files>
</project-private>

0 comments on commit 3260774

Please sign in to comment.