From 7dc92fb8079a01037faab71ecc90fe2fb6221d58 Mon Sep 17 00:00:00 2001 From: Andre Guedes Date: Wed, 6 Jun 2012 21:41:03 -0300 Subject: [PATCH] Remove workaround in gatt_connect This workaround is not necessary anymore since setsockopt is now checking for minimum MTU. --- attrib/utils.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/attrib/utils.c b/attrib/utils.c index f809b1f1a..d856fe2a3 100644 --- a/attrib/utils.c +++ b/attrib/utils.c @@ -36,10 +36,6 @@ #include "btio.h" #include "gatttool.h" -/* Minimum MTU for ATT connections */ -#define ATT_MIN_MTU_LE 23 -#define ATT_MIN_MTU_L2CAP 48 - GIOChannel *gatt_connect(const gchar *src, const gchar *dst, const gchar *dst_type, const gchar *sec_level, int psm, int mtu, BtIOConnect connect_cb) @@ -49,15 +45,6 @@ GIOChannel *gatt_connect(const gchar *src, const gchar *dst, uint8_t dest_type; GError *err = NULL; BtIOSecLevel sec; - int minimum_mtu; - - /* This check is required because currently setsockopt() returns no - * errors for MTU values smaller than the allowed minimum. */ - minimum_mtu = psm ? ATT_MIN_MTU_L2CAP : ATT_MIN_MTU_LE; - if (mtu != 0 && mtu < minimum_mtu) { - g_printerr("MTU cannot be smaller than %d\n", minimum_mtu); - return NULL; - } /* Remote device */ if (dst == NULL) { -- 2.47.3