Diff between 9880d103569e11d011decd8de578057ed284e43e and 1b0d95cd60216d4f7c7315ffee1c29f50da2b444

Changed Files

File Additions Deletions Status
obexd/src/log.c +11 -0 modified
obexd/src/obex.c +2 -0 modified

Full Patch

diff --git a/obexd/src/log.c b/obexd/src/log.c
index ac8327c..02c06fb 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 82803ee..f250a5e 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);
 }