Skip to content

Commit

Permalink
core: print response codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiz Augusto von Dentz committed Jul 6, 2010
1 parent cb0a058 commit 01f3e4f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/obex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 01f3e4f

Please sign in to comment.