mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
adding printf for debugging
This commit is contained in:
parent
9d31478440
commit
77b7251502
@ -15,10 +15,11 @@ void ElopageWebhook::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::
|
||||
std::istream& stream = request.stream();
|
||||
Poco::Net::NameValueCollection elopageRequestData;
|
||||
while (!stream.eof()) {
|
||||
char keyBuffer[30];
|
||||
char valueBuffer[35];
|
||||
char keyBuffer[30]; memset(keyBuffer, 0, 30);
|
||||
char valueBuffer[35]; memset(valueBuffer, 0, 35);
|
||||
stream.get(keyBuffer, 30, '=')
|
||||
.get(valueBuffer, 35, '&');
|
||||
printf("[ElopageWebhook::handleRequest] key: %s, value: %s\n", keyBuffer, valueBuffer);
|
||||
elopageRequestData.set(keyBuffer, valueBuffer);
|
||||
}
|
||||
UniLib::controller::TaskPtr handleElopageTask(new HandleElopageRequestTask(elopageRequestData));
|
||||
|
||||
@ -13,7 +13,7 @@ namespace UniLib {
|
||||
|
||||
int Thread::init(const char* threadName)
|
||||
{
|
||||
semaphore.wait();
|
||||
//semaphore.wait();
|
||||
mPocoThread = new Poco::Thread(threadName);
|
||||
mPocoThread->start(*this);
|
||||
return 0;
|
||||
@ -21,15 +21,19 @@ namespace UniLib {
|
||||
|
||||
Thread::~Thread()
|
||||
{
|
||||
printf("[Thread::~Thread]\n");
|
||||
if(mPocoThread)
|
||||
{
|
||||
//Post Exit to Thread
|
||||
exitCalled = true;
|
||||
semaphore.wait();
|
||||
|
||||
printf("[Thread::~Thread] before semaphore wait\n");
|
||||
//semaphore.wait();
|
||||
printf("[Thread::~Thread] after semaphore wait, before condSignal\n");
|
||||
condSignal();
|
||||
printf("[Thread::~Thread] after condSignal, before thread join\n");
|
||||
//SDL_Delay(500);
|
||||
mPocoThread->join();
|
||||
printf("[Thread::~Thread] after thread join\n");
|
||||
//SDL_WaitThread(thread, NULL);
|
||||
//LOG_WARNING_SDL();
|
||||
delete mPocoThread;
|
||||
@ -54,7 +58,7 @@ namespace UniLib {
|
||||
//Thread* t = this;
|
||||
while (true) {
|
||||
try {
|
||||
semaphore.tryWait(100);
|
||||
//semaphore.tryWait(100);
|
||||
//printf("[Thread::%s] end worker thread\n", __FUNCTION__);
|
||||
//break;
|
||||
if (exitCalled) return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user