summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2020-10-11 19:10:37 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2020-12-05 21:28:08 +0100
commita6b490ef831edea901d3e866c6a32a11d018c911 (patch)
tree92f0fa48f8ad266a6f819f2ece2e76bec55b9cd3 /src
parent051b8ac8d2a74057bdf21f325484b75481a27983 (diff)
OBEX: additional debug output
This shows more clearly when OBEX function calls are made, which is relevant for libopenobex2 (OBEX_HandleInput must be called after OBEX_Request).
Diffstat (limited to 'src')
-rw-r--r--src/syncevo/ObexTransportAgent.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/syncevo/ObexTransportAgent.cpp b/src/syncevo/ObexTransportAgent.cpp
index 7c05656a..f5a5147e 100644
--- a/src/syncevo/ObexTransportAgent.cpp
+++ b/src/syncevo/ObexTransportAgent.cpp
@@ -234,6 +234,7 @@ void ObexTransportAgent::connectReq() {
OBEX_ObjectAddHeader(m_handle, connect, OBEX_HDR_TARGET, header, strlen ((char *) header.bs), OBEX_FL_FIT_ONE_PACKET);
m_obexReady = false;
m_requestStart = time (nullptr);
+ SE_LOG_DEV(NULL, "ObexTransportAgent: OBEX_Request for OBEX_CMD_CONNECT");
if (OBEX_Request (m_handle, connect) <0) {
SE_THROW_EXCEPTION (TransportException, "ObexTransport: OBEX connect init failed");
}
@@ -276,7 +277,7 @@ void ObexTransportAgent::shutdown() {
//add header "connection id"
obex_headerdata_t header;
header.bq4 = m_connectId;
- SE_LOG_DEV(NULL, "ObexTransportAgent::shutdown: send OBEX_CMD_DISCONNECT");
+ SE_LOG_DEV(NULL, "ObexTransportAgent::shutdown: OBEX_Request for OBEX_CMD_DISCONNECT");
OBEX_ObjectAddHeader (m_handle, disconnect, OBEX_HDR_CONNECTION, header, sizeof
(m_connectId), OBEX_FL_FIT_ONE_PACKET);
if (OBEX_Request (m_handle, disconnect) <0) {
@@ -322,6 +323,7 @@ void ObexTransportAgent::send(const char *data, size_t len) {
m_status = ACTIVE;
m_requestStart = time (nullptr);
m_obexReady = false;
+ SE_LOG_DEV(NULL, "ObexTransportAgent: OBEX_Request for OBEX_CMD_PUT");
if (OBEX_Request (m_handle, put) < 0) {
SE_THROW_EXCEPTION (TransportException, "ObexTransport: send failed");
}
@@ -408,6 +410,7 @@ TransportAgent::Status ObexTransportAgent::wait(bool noReply) {
//send the request
m_obexReady = false;
+ SE_LOG_DEV(NULL, "ObexTransportAgent: OBEX_Request for OBEX_CMD_GET");
if (OBEX_Request (m_handle, get) < 0) {
SE_THROW_EXCEPTION (TransportException, "ObexTransport: get failed");
}
@@ -625,6 +628,7 @@ gboolean ObexTransportAgent::obex_fd_source_cb_impl (GIOChannel *io, GIOConditio
return TRUE;
}
+ SE_LOG_DEV(NULL, "ObexTransportAgent: OBEX_HandleInput");
if (OBEX_HandleInput (m_handle, OBEX_POLL_INTERVAL) <0 && errno != EINTR) {
//transport error
//no way to recovery, simply abort