- more changes to unify development across different projects (callers / server / hasq / softphone)

This commit is contained in:
2018-06-05 13:52:17 +03:00
parent 14fb3bbdbf
commit 5afaa1299e
16 changed files with 62 additions and 53 deletions

View File

@@ -4,26 +4,7 @@ project (helper_lib)
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (HELPER_LIB_SOURCES
HL_AsyncCommand.cpp
HL_Calculator.cpp
HL_CsvReader.cpp
HL_Epoll.cpp
HL_HepSupport.cpp
HL_IuUP.cpp
HL_Log.cpp
HL_NetworkFrame.cpp
HL_NetworkSocket.cpp
HL_OsVersion.cpp
HL_Pointer.cpp
HL_Rtp.cpp
HL_Singletone.cpp
HL_SocketHeap.cpp
HL_String.cpp
HL_Sync.cpp
HL_Usb.cpp
HL_Uuid.cpp
HL_VariantMap.cpp
)
file(GLOB HELPER_LIB_SOURCES "*.cpp" "*.h")
add_library(helper_lib ${HELPER_LIB_SOURCES})
target_include_directories(helper_lib PRIVATE ../../libs/ ../../engine ../)

View File

@@ -6,15 +6,13 @@
#ifndef __SMART_POINTER_H
#define __SMART_POINTER_H
#ifdef USE_NATIVE_SMARTPTR
# include <memory>
# define SharedPtr std::shared_ptr
#else
#include "../../libs/resiprocate/rutil/SharedPtr.hxx"
using resip::SharedPtr;
#endif
#include <memory>
#define SharedPtr std::shared_ptr
#include "HL_Sync.h"
#include <map>
class UsageCounter
{
public:

View File

@@ -7,9 +7,9 @@
#include "HL_Exception.h"
#include "HL_String.h"
#include "rtprawpacket.h"
#include "rtpipv4address.h"
#include <alloc.h>
#include "jrtplib/src/rtprawpacket.h"
#include "jrtplib/src/rtpipv4address.h"
#include <alloca.h>
#include <sstream>
#include <tuple>

View File

@@ -10,6 +10,8 @@
#endif
#include <set>
#include <assert.h>
#include <unistd.h> // Responsible for close() call on Linux
#include "HL_SocketHeap.h"
#include "HL_Log.h"
#include "HL_Sync.h"
@@ -279,6 +281,7 @@ void SocketHeap::thread()
SyncHelper::delay(1000); // Delay for 1 millisecond
}
mId = 0;
mShutdown = false;
//#endif
}

View File

@@ -103,7 +103,10 @@ protected:
Mutex mDeleteGuard;
char mTempPacket[MAX_UDPPACKET_SIZE];
volatile bool mShutdown = false;
int mId = 0;
bool isShutdown() const { return mShutdown; }
virtual void thread();
// Processes mDeleteVector -> updates mSocketMap, removes socket items and closes sockets specified in mDeleteVector