summaryrefslogtreecommitdiff
path: root/app/src/hog.c
diff options
context:
space:
mode:
authorCarey <kcarey1@APC02S226SG8WM.local>2020-10-28 07:40:54 -0500
committerCarey <kcarey1@APC02S226SG8WM.local>2020-10-28 07:40:54 -0500
commit99ad9cbdefee94007511ec2e53437951cf0e4305 (patch)
tree168c9886965ad5e5f36f4fbbad55cd5f70c5124e /app/src/hog.c
parent6aae66782682ffcabf953d785308b83ee16fc3b6 (diff)
parentcb922fd8a2a3eddcbece040ca3727d43b171ffe3 (diff)
Merge https://github.com/zmkfirmware/zmk into refactor_kconfig
Diffstat (limited to 'app/src/hog.c')
-rw-r--r--app/src/hog.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/src/hog.c b/app/src/hog.c
index 11349ac..bcd652d 100644
--- a/app/src/hog.c
+++ b/app/src/hog.c
@@ -164,8 +164,10 @@ int zmk_hog_send_keypad_report(struct zmk_hid_keypad_report_body *report) {
LOG_DBG("Sending to NULL? %s", conn == NULL ? "yes" : "no");
- return bt_gatt_notify(conn, &hog_svc.attrs[5], report,
- sizeof(struct zmk_hid_keypad_report_body));
+ int err =
+ bt_gatt_notify(conn, &hog_svc.attrs[5], report, sizeof(struct zmk_hid_keypad_report_body));
+ bt_conn_unref(conn);
+ return err;
};
int zmk_hog_send_consumer_report(struct zmk_hid_consumer_report_body *report) {
@@ -174,6 +176,8 @@ int zmk_hog_send_consumer_report(struct zmk_hid_consumer_report_body *report) {
return -ENOTCONN;
}
- return bt_gatt_notify(conn, &hog_svc.attrs[10], report,
- sizeof(struct zmk_hid_consumer_report_body));
+ int err = bt_gatt_notify(conn, &hog_svc.attrs[10], report,
+ sizeof(struct zmk_hid_consumer_report_body));
+ bt_conn_unref(conn);
+ return err;
};