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 2017/10/24 08:14:37 UTC
[GitHub] rymanluk closed pull request #627: oic/ble_adapter: Fix build errors build for oc_client configuration
rymanluk closed pull request #627: oic/ble_adapter: Fix build errors build for oc_client configuration
URL: https://github.com/apache/mynewt-core/pull/627
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/net/oic/src/port/mynewt/ble_adaptor.c b/net/oic/src/port/mynewt/ble_adaptor.c
index 25f405ad5..3feffbe63 100644
--- a/net/oic/src/port/mynewt/ble_adaptor.c
+++ b/net/oic/src/port/mynewt/ble_adaptor.c
@@ -327,6 +327,7 @@ oc_connectivity_shutdown_gatt(void)
/* there is not unregister for BLE */
}
+#if (MYNEWT_VAL(OC_SERVER) == 1)
static int
oc_ble_frag(struct os_mbuf *m, uint16_t mtu)
{
@@ -369,19 +370,18 @@ oc_ble_frag(struct os_mbuf *m, uint16_t mtu)
};
return -1;
}
+#endif
void
oc_send_buffer_gatt(struct os_mbuf *m)
{
+#if (MYNEWT_VAL(OC_SERVER) == 1)
struct oc_endpoint *oe;
struct os_mbuf_pkthdr *pkt;
uint16_t mtu;
uint16_t conn_handle;
uint16_t attr_handle;
-
- assert(OS_MBUF_USRHDR_LEN(m) >= sizeof(struct oc_endpoint_ble));
- oe = OC_MBUF_ENDPOINT(m);
- conn_handle = oe->oe_ble.conn_handle;
+#endif
#if (MYNEWT_VAL(OC_CLIENT) == 1)
OC_LOG_ERROR("oc_gatt send not supported on client");
@@ -389,6 +389,10 @@ oc_send_buffer_gatt(struct os_mbuf *m)
#if (MYNEWT_VAL(OC_SERVER) == 1)
+ assert(OS_MBUF_USRHDR_LEN(m) >= sizeof(struct oc_endpoint_ble));
+ oe = OC_MBUF_ENDPOINT(m);
+ conn_handle = oe->oe_ble.conn_handle;
+
STATS_INC(oc_ble_stats, oframe);
STATS_INCN(oc_ble_stats, obytes, OS_MBUF_PKTLEN(m));
----------------------------------------------------------------
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