VNG board

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Mon Dec 01 14:31:18 2014 +0000
Parent:
212:852d45a52016
Child:
214:7d79fa197212
Commit message:
Synchronized with git rev 0c38a1e8
Author: Rohit Grover
fast path for encodeURISchemePrefix() if sizeofURLData is 0

Changed in this revision

services/URIBeaconConfigService.h Show annotated file Show diff for this revision Revisions of this file
--- a/services/URIBeaconConfigService.h	Mon Dec 01 14:31:18 2014 +0000
+++ b/services/URIBeaconConfigService.h	Mon Dec 01 14:31:18 2014 +0000
@@ -182,6 +182,10 @@
     }
 
     size_t encodeURISchemePrefix(const char *&urldata, size_t &sizeofURLData) {
+        if (!sizeofURLData) {
+            return 0;
+        }
+
         const char *prefixes[] = {
             "http://www.",
             "https://www.",