From patchwork Thu Sep 5 21:52:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Shmidt X-Patchwork-Id: 272983 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id D75922C00E5 for ; Fri, 6 Sep 2013 07:56:37 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id B82069C1F9; Thu, 5 Sep 2013 17:56:33 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n8oIj+ssHitq; Thu, 5 Sep 2013 17:56:33 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 11D839C18B; Thu, 5 Sep 2013 17:56:29 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 702FC9C18B for ; Thu, 5 Sep 2013 17:56:27 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QbehJHYxyGsC for ; Thu, 5 Sep 2013 17:56:22 -0400 (EDT) Received: from mail-qc0-f201.google.com (mail-qc0-f201.google.com [209.85.216.201]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 5DA0D9C186 for ; Thu, 5 Sep 2013 17:56:22 -0400 (EDT) Received: by mail-qc0-f201.google.com with SMTP id e16so282063qcx.4 for ; Thu, 05 Sep 2013 14:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:date:subject:to:message-id; bh=LN0xAqt3XQPiyvGH4UdjC40QlrlaUuH600XkR7K9o0c=; b=lCmh3wv21C/wiTAYfMCeNKUfH6CDM+1wy1jJoPkkZgwvgTFySbfLYyk8ImiraZi/iu +S8Y8Kmpi7MR5VNA70pnSbJ0IFh71czP3N6bZuD+bKSFTTinFbDk68jWDHIh8txKSnHK 0H9jgHpBgegojKKUXmjqn/82n1kGtjtygnzCMnD/xL40guVk+ozXj6Bu98+lqKXV3mrP Q1moljSlL7awSL4RRXzDzaTRZ8LTjI3qAa+rlqzDJjViodi8kNnHrlpM7GyzHJGulNdv xIRQFkC1N17dcGDvRHmwv7sGpapSM0G3wMr9ULK2NDrpspPz/90XKXqLpQbn+qP67hLO hdFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:subject:to:message-id; bh=LN0xAqt3XQPiyvGH4UdjC40QlrlaUuH600XkR7K9o0c=; b=dcE2IuyeZ3bQlshq8oclHsRWhrwz3UADRxPywueqzYAIDbV3E3L8ItpmP908pONGXT plqTMbMiGDInarOWmcvxQ5KmV5GlKWdJ4ooMX6tLZHgOTrkVngipi2Jz0Wqbmr3n8viM Bs1M02Vkqes+abjecnUk++MFOaXzA+XX6bHofLdTfdIGX/xdfOlC3gPwR9qn1DklJe/b sBvWY+m/i7qcbqBZqA++h0cvjhUTuWccv8KRn9aQu7bXmI0Ujl4K6OnvlFkK5Xl6QBvr TDxxymnWrsc6KcteiSucy3ngzSKNl7+jGWCw4aWck9U/iJYnOhGp45U+W7zLhuBVyF0Q a/qg== X-Gm-Message-State: ALoCoQl5Z83pqvIWxYGzWGMVh5PSUZHv3bC0p8xbAh8dvDIk3QpE05BPem5V2G+bdiJg7rXVyk/jeNrsvrzlTIlSwadwKq38ATn8tUU9HPjZtCGx7VxWj/rNLTEBdM2KTCxx6lO0zvKvaQixx1ThQiPTJdaHRmpBcuygOjiy+yGpyGAORwylfmRG30SM7/vXQQRWzBgf++opjWFSLLyVXc83zFAJP+rdkzUeXxyxcWpIhrG3iEiDswI= X-Received: by 10.236.66.244 with SMTP id h80mr3870019yhd.30.1378418181984; Thu, 05 Sep 2013 14:56:21 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id a42si1610538yhj.6.1969.12.31.16.00.00 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Thu, 05 Sep 2013 14:56:21 -0700 (PDT) Received: from ushik.mtv.corp.google.com (ushik.mtv.corp.google.com [172.18.120.113]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id CB6425A4274 for ; Thu, 5 Sep 2013 14:56:21 -0700 (PDT) Received: by ushik.mtv.corp.google.com (Postfix, from userid 57417) id 64CB614001B; Thu, 5 Sep 2013 14:56:21 -0700 (PDT) From: Dmitry Shmidt Date: Thu, 5 Sep 2013 14:52:18 -0700 Subject: [PATCH] Android: Clean entire socket directory To: hostap@lists.shmoo.com Message-Id: <20130905215621.64CB614001B@ushik.mtv.corp.google.com> X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com Despite interface (and group) related sockets are not used for control, they are created and may be left. Signed-off-by: Dmitry Shmidt --- src/common/wpa_ctrl.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/common/wpa_ctrl.c b/src/common/wpa_ctrl.c index d9a7509..83788d7 100644 --- a/src/common/wpa_ctrl.c +++ b/src/common/wpa_ctrl.c @@ -229,7 +229,6 @@ void wpa_ctrl_cleanup(void) struct dirent entry; struct dirent *result; size_t dirnamelen; - int prefixlen = os_strlen(CONFIG_CTRL_IFACE_CLIENT_PREFIX); size_t maxcopy; char pathname[PATH_MAX]; char *namep; @@ -246,11 +245,8 @@ void wpa_ctrl_cleanup(void) namep = pathname + dirnamelen; maxcopy = PATH_MAX - dirnamelen; while (readdir_r(dir, &entry, &result) == 0 && result != NULL) { - if (os_strncmp(entry.d_name, CONFIG_CTRL_IFACE_CLIENT_PREFIX, - prefixlen) == 0) { - if (os_strlcpy(namep, entry.d_name, maxcopy) < maxcopy) - unlink(pathname); - } + if (os_strlcpy(namep, entry.d_name, maxcopy) < maxcopy) + unlink(pathname); } closedir(dir); }