From 1b0d95cd60216d4f7c7315ffee1c29f50da2b444 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 5 Jul 2010 18:56:48 +0300 Subject: [PATCH] obexd: print response codes --- obexd/src/log.c | 11 +++++++++++ obexd/src/obex.c | 2 ++ 2 files changed, 13 insertions(+) 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) diff --git a/obexd/src/obex.c b/obexd/src/obex.c index 82803ee52..f250a5e18 100644 --- a/obexd/src/obex.c +++ b/obexd/src/obex.c @@ -126,6 +126,8 @@ static void os_set_response(obex_object_t *obj, int err) lastrsp = OBEX_RSP_INTERNAL_SERVER_ERROR; } + obex_debug(-1, -1, rsp); + OBEX_ObjectSetRsp(obj, rsp, lastrsp); } -- 2.47.3