summaryrefslogtreecommitdiff
path: root/obexd/src/log.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>2010-07-05 18:56:48 +0300
committerMarcel Holtmann <marcel@holtmann.org>2012-12-04 22:48:22 +0100
commit1b0d95cd60216d4f7c7315ffee1c29f50da2b444 (patch)
tree79e08f65e81e4ffa4dd702bc12b6c7c39c0c67c4 /obexd/src/log.c
parent9880d103569e11d011decd8de578057ed284e43e (diff)
obexd: print response codes
Diffstat (limited to 'obexd/src/log.c')
-rw-r--r--obexd/src/log.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/obexd/src/log.c b/obexd/src/log.c
index ac8327c18..02c06fb95 100644
--- a/obexd/src/log.c
+++ b/obexd/src/log.c
@@ -166,6 +166,17 @@ void obex_debug(int evt, int cmd, int rsp)
{
const char *evtstr = NULL, *cmdstr = NULL, *rspstr = NULL;
int i;
+ static int lastevt, lastcmd;
+
+ if (evt < 0)
+ evt = lastevt;
+ else
+ lastevt = evt;
+
+ if (cmd < 0)
+ cmd = lastcmd;
+ else
+ lastcmd = cmd;
for (i = 0; obex_event[i].evt != 0xFF; i++) {
if (obex_event[i].evt != evt)