Loading src/error.h +3 −2 Original line number Diff line number Diff line Loading @@ -25,16 +25,17 @@ namespace p3 { class perror : std::exception { std::string context; std::string error; std::string message; public: perror(std::string c, std::string e) : context(c), error(e) {}; perror(std::string c, std::string e) : context(c), error(e), message(c + ": " + e) {}; ~perror() throw () {}; const char * getContext() { return context.c_str(); } const char * getError() { return error.c_str(); } const char* what() const throw() { return (context + ": " + error).c_str(); return message.c_str(); } }; } Loading src/msgq.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,10 @@ p3::mQueue::mQueue(const std::string& id, bool c, bool p) : flags |= O_CREAT; inkey = key + "-2"; outkey = key + "-1"; // Make sure our queues are clean mq_unlink(inkey.c_str()); mq_unlink(outkey.c_str()); } else { inkey = key + "-1"; outkey = key + "-2"; Loading src/sipphone.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,7 @@ p3::sipphone::~sipphone() { void p3::sipphone::register_thread(const std::string& id) { std::lock_guard<std::mutex> g(threads_mutex); pj_thread_desc* ptd = new pj_thread_desc[1]; pj_thread_desc* ptd = new pj_thread_desc[1](); pj_thread_t* tptr; pj_thread_register(id.c_str(), *ptd, &tptr); pj_threads[id] = { tptr, ptd }; Loading Loading
src/error.h +3 −2 Original line number Diff line number Diff line Loading @@ -25,16 +25,17 @@ namespace p3 { class perror : std::exception { std::string context; std::string error; std::string message; public: perror(std::string c, std::string e) : context(c), error(e) {}; perror(std::string c, std::string e) : context(c), error(e), message(c + ": " + e) {}; ~perror() throw () {}; const char * getContext() { return context.c_str(); } const char * getError() { return error.c_str(); } const char* what() const throw() { return (context + ": " + error).c_str(); return message.c_str(); } }; } Loading
src/msgq.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,10 @@ p3::mQueue::mQueue(const std::string& id, bool c, bool p) : flags |= O_CREAT; inkey = key + "-2"; outkey = key + "-1"; // Make sure our queues are clean mq_unlink(inkey.c_str()); mq_unlink(outkey.c_str()); } else { inkey = key + "-1"; outkey = key + "-2"; Loading
src/sipphone.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,7 @@ p3::sipphone::~sipphone() { void p3::sipphone::register_thread(const std::string& id) { std::lock_guard<std::mutex> g(threads_mutex); pj_thread_desc* ptd = new pj_thread_desc[1]; pj_thread_desc* ptd = new pj_thread_desc[1](); pj_thread_t* tptr; pj_thread_register(id.c_str(), *ptd, &tptr); pj_threads[id] = { tptr, ptd }; Loading