header_offset = rsp_header_offset(opcode);
} else {
opcode = obex->rx_buf[0] & ~FINAL_BIT;
+ /* Unexpected response -- fail silently */
+ if (opcode > 0x1f && opcode < 0xff) {
+ obex->rx_data = 0;
+ return TRUE;
+ }
header_offset = req_header_offset(opcode);
obex->rx_last_op = opcode;
}
g_obex_set_disconnect_function(obex, unexpected_disconn, &err);
- req = g_obex_packet_new(G_OBEX_RSP_SUCCESS, TRUE, NULL);
+ req = g_obex_packet_new(G_OBEX_RSP_CONTINUE, TRUE, NULL);
len = g_obex_packet_encode(req, buf, sizeof(buf));
g_assert_cmpint(len, >=, 0);