aboutsummaryrefslogtreecommitdiff
path: root/hw/bt/sdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/bt/sdp.c')
-rw-r--r--hw/bt/sdp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/bt/sdp.c b/hw/bt/sdp.c
index 3cb60b9495..f4aba9d74f 100644
--- a/hw/bt/sdp.c
+++ b/hw/bt/sdp.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "qemu-common.h"
#include "qemu/host-utils.h"
#include "hw/bt.h"
@@ -506,7 +507,7 @@ static void bt_l2cap_sdp_sdu_in(void *opaque, const uint8_t *data, int len)
int rsp_len = 0;
if (len < 5) {
- fprintf(stderr, "%s: short SDP PDU (%iB).\n", __FUNCTION__, len);
+ error_report("%s: short SDP PDU (%iB).", __func__, len);
return;
}
@@ -517,8 +518,8 @@ static void bt_l2cap_sdp_sdu_in(void *opaque, const uint8_t *data, int len)
len -= 5;
if (len != plen) {
- fprintf(stderr, "%s: wrong SDP PDU length (%iB != %iB).\n",
- __FUNCTION__, plen, len);
+ error_report("%s: wrong SDP PDU length (%iB != %iB).",
+ __func__, plen, len);
err = SDP_INVALID_PDU_SIZE;
goto respond;
}
@@ -544,8 +545,8 @@ static void bt_l2cap_sdp_sdu_in(void *opaque, const uint8_t *data, int len)
case SDP_SVC_SEARCH_RSP:
case SDP_SVC_SEARCH_ATTR_RSP:
default:
- fprintf(stderr, "%s: unexpected SDP PDU ID %02x.\n",
- __FUNCTION__, pdu_id);
+ error_report("%s: unexpected SDP PDU ID %02x.",
+ __func__, pdu_id);
err = SDP_INVALID_SYNTAX;
break;
}