summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2017-10-19 23:23:08 -0700
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2017-10-27 06:18:36 +0000
commita554daaf057235511094959063fe8ffd8dd2b295 (patch)
treed6745bff465670c723484601534d65c6869a5f41
parent66b90915250dd39b10c56883e091b1cd5b1cd64d (diff)
Removed thread loop
This is redundant thread It works without thread Bug-AGL : SPEC-996 Change-Id: Ie23dcdcb7ae440bfb620d99ab1bf3a0979595756 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r--include/libsoundmanager.hpp1
-rw-r--r--libsoundmanager/libsoundmanager.cpp26
2 files changed, 0 insertions, 27 deletions
diff --git a/include/libsoundmanager.hpp b/include/libsoundmanager.hpp
index 740675b..ed61db6 100644
--- a/include/libsoundmanager.hpp
+++ b/include/libsoundmanager.hpp
@@ -67,7 +67,6 @@ public:
void (*hangup_cb)(void) = nullptr);
private:
- int run_eventloop();
int init_event();
int initialize_websocket();
int dispatch_asyncSetSourceState(int sourceID, int handle, const std::string& sourceState);
diff --git a/libsoundmanager/libsoundmanager.cpp b/libsoundmanager/libsoundmanager.cpp
index c7caa7f..8ee5303 100644
--- a/libsoundmanager/libsoundmanager.cpp
+++ b/libsoundmanager/libsoundmanager.cpp
@@ -148,11 +148,6 @@ int LibSoundmanager::init(int port, const string& token)
ELOG("Failed to initialize websocket");
return -1;
}
- ret = run_eventloop();
- if(ret == -1){
- ELOG("Failed to create thread");
- return -1;
- }
return 0;
}
@@ -227,27 +222,6 @@ void LibSoundmanager::register_callback(
onHangup = hangup_cb;
}
-int LibSoundmanager::run_eventloop()
-{
- if(mploop && sp_websock)
- {
- pthread_t thread_id;
- int ret = pthread_create(&thread_id, NULL, event_loop_run, mploop);
- if(ret != 0)
- {
- ELOG("Cannot run eventloop due to error:%d", errno);
- return -1;
- }
- else
- return 0;
- }
- else
- {
- ELOG("Connecting is not established yet");
- return -1;
- }
-}
-
/**
* This function calls registerSource of Audio Manager via WebSocket
* registerSource is registration as source for policy management