Skip to content

Commit 8c0e16d

Browse files
More logging
1 parent e6831f5 commit 8c0e16d

File tree

6 files changed

+22
-5
lines changed

6 files changed

+22
-5
lines changed

examples/tv-casting-app/android/App/app/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ android {
2727
}
2828

2929
debug {
30+
debuggable true
3031
packagingOptions{
3132
doNotStrip "**/*.so"
3233
}

examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/CastingApp.java

+5
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,10 @@ public MatterError stop() {
160160
static {
161161
System.loadLibrary("TvCastingApp");
162162
System.out.println("TvCastingApp loaded");
163+
164+
System.out.println("CHIPController loading");
165+
System.loadLibrary("CHIPController");
166+
System.out.println("CHIPController loaded");
167+
163168
}
164169
}

examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/MatterEndpoint.java

-4
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ public void onConnectionFailure(long nodeId, Exception error) {
8686

8787
public void testGetCluster()
8888
{
89-
System.out.println("CHIPController loading");
90-
System.loadLibrary("CHIPController");
91-
System.out.println("CHIPController loaded");
92-
9389
getDeviceProxy(new SuccessCallback<Long>() {
9490
@Override
9591
public void handle(Long deviceProxyPtr) {

examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/MatterEndpoint-JNI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static void FindOrEstablishConnectionTask(intptr_t context)
114114
VerifyOrReturn(throwableObject != nullptr,
115115
ChipLogError(AppServer, "MatterEndpointJNI::FindOrEstablishSessionTask() Could not create throwableObject"));
116116

117-
SessionContextJNI * __context = static_cast<SessionContextJNI *>(context);
117+
//SessionContextJNI * __context = static_cast<SessionContextJNI *>(context);
118118
});
119119

120120
}

src/messaging/ExchangeContext.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
#include <protocols/Protocols.h>
5151
#include <protocols/secure_channel/Constants.h>
5252

53+
#if CONFIG_DEVICE_LAYER
54+
#include <platform/CHIPDeviceLayer.h>
55+
#endif
56+
5357
using namespace chip::Encoding;
5458
using namespace chip::Inet;
5559
using namespace chip::System;
@@ -443,13 +447,22 @@ void ExchangeContext::OnSessionReleased()
443447

444448
CHIP_ERROR ExchangeContext::StartResponseTimer()
445449
{
450+
ChipLogProgress(Controller, "ExchangeContext::StartResponseTimer()");
451+
assertChipStackLockedByCurrentThread();
452+
ChipLogProgress(Controller, "ExchangeContext::StartResponseTimer() after assert");
453+
446454
System::Layer * lSystemLayer = mExchangeMgr->GetSessionManager()->SystemLayer();
455+
//System::Layer * lSystemLayer = &chip::DeviceLayer::SystemLayer();
447456
if (lSystemLayer == nullptr)
448457
{
449458
// this is an assertion error, which shall never happen
450459
return CHIP_ERROR_INTERNAL;
451460
}
452461

462+
ChipLogProgress(Controller, "ExchangeContext::StartResponseTimer() after mExchangeMgr->GetSessionManager()->SystemLayer()");
463+
assertChipStackLockedByCurrentThread();
464+
ChipLogProgress(Controller, "ExchangeContext::StartResponseTimer() after assert");
465+
453466
return lSystemLayer->StartTimer(mResponseTimeout, HandleResponseTimeout, this);
454467
}
455468

src/system/SystemLayerImplSelect.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ void LayerImplSelect::Signal()
155155

156156
CHIP_ERROR LayerImplSelect::StartTimer(Clock::Timeout delay, TimerCompleteCallback onComplete, void * appState)
157157
{
158+
ChipLogProgress(Controller, "LayerImplSelect::StartTimer");
158159
assertChipStackLockedByCurrentThread();
160+
ChipLogProgress(Controller, "LayerImplSelect::StartTimer after assert");
159161

160162
VerifyOrReturnError(mLayerState.IsInitialized(), CHIP_ERROR_INCORRECT_STATE);
161163

0 commit comments

Comments
 (0)