You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/12/07 15:03:45 UTC
[GitHub] rymanluk closed pull request #253: Fix the issue of removing
multiple procs having same opcode
rymanluk closed pull request #253: Fix the issue of removing multiple procs having same opcode
URL: https://github.com/apache/mynewt-nimble/pull/253
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/nimble/host/src/ble_gattc.c b/nimble/host/src/ble_gattc.c
index 2a55b9d2..a6ae1470 100644
--- a/nimble/host/src/ble_gattc.c
+++ b/nimble/host/src/ble_gattc.c
@@ -971,7 +971,7 @@ ble_gattc_extract_one(ble_gattc_match_fn *cb, void *arg)
}
static void
-ble_gattc_extract_by_conn_op(uint16_t conn_handle, uint8_t op,
+ble_gattc_extract_by_conn_op(uint16_t conn_handle, uint8_t op, int max_procs,
struct ble_gattc_proc_list *dst_list)
{
struct ble_gattc_criteria_conn_op criteria;
@@ -979,7 +979,7 @@ ble_gattc_extract_by_conn_op(uint16_t conn_handle, uint8_t op,
criteria.conn_handle = conn_handle;
criteria.op = op;
- ble_gattc_extract(ble_gattc_proc_matches_conn_op, &criteria, 0, dst_list);
+ ble_gattc_extract(ble_gattc_proc_matches_conn_op, &criteria, max_procs, dst_list);
}
static struct ble_gattc_proc *
@@ -987,7 +987,7 @@ ble_gattc_extract_first_by_conn_op(uint16_t conn_handle, uint8_t op)
{
struct ble_gattc_proc_list dst_list;
- ble_gattc_extract_by_conn_op(conn_handle, op, &dst_list);
+ ble_gattc_extract_by_conn_op(conn_handle, op, 1, &dst_list);
return STAILQ_FIRST(&dst_list);
}
@@ -1076,7 +1076,7 @@ ble_gattc_fail_procs(uint16_t conn_handle, uint8_t op, int status)
/* Remove all procs with the specified conn handle-op-pair and insert them
* into the temporary list.
*/
- ble_gattc_extract_by_conn_op(conn_handle, op, &temp_list);
+ ble_gattc_extract_by_conn_op(conn_handle, op, 0, &temp_list);
/* Notify application of failed procedures and free the corresponding proc
* entries.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services