Baruch Siach | 5 Jul 2012 16:19
Picon

[PATCH] accounting: staticise accounting_sta_interim

This routine is not used anywhere else.

Signed-hostap Baruch Siach <baruch <at> tkos.co.il>
---
 src/ap/accounting.c |   25 +++++++++++++------------
 src/ap/accounting.h |    1 -
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/ap/accounting.c b/src/ap/accounting.c
index 2c3a6d9..40828c1 100644
--- a/src/ap/accounting.c
+++ b/src/ap/accounting.c
 <at>  <at>  -242,6 +242,19  <at>  <at>  static int accounting_sta_update_stats(struct hostapd_data *hapd,
 }

 
+/**
+ * accounting_sta_interim - Send a interim STA accounting report
+ *  <at> hapd: hostapd BSS data
+ *  <at> sta: The station
+ */
+static void accounting_sta_interim(struct hostapd_data *hapd,
+				   struct sta_info *sta)
+{
+	if (sta->acct_session_started)
+		accounting_sta_report(hapd, sta, 0);
+}
+
+
 static void accounting_interim_update(void *eloop_ctx, void *timeout_ctx)
(Continue reading)

Jouni Malinen | 4 Aug 2012 10:59
Picon

Re: [PATCH] accounting: staticise accounting_sta_interim

On Thu, Jul 05, 2012 at 05:19:51PM +0300, Baruch Siach wrote:
> This routine is not used anywhere else.

> +static void accounting_sta_interim(struct hostapd_data *hapd,
> +				   struct sta_info *sta)
> +{
> +	if (sta->acct_session_started)
> +		accounting_sta_report(hapd, sta, 0);

This results in compiler warnings/errors due to accounting_sta_report()
not being declared here. It would be easier to just leave
accounting_sta_interim() in its old location and add a static prototype
for it in the beginning of the file.

--

-- 
Jouni Malinen                                            PGP id EFC895FA
Baruch Siach | 5 Aug 2012 07:16
Picon

[PATCH v2] accounting: staticise accounting_sta_interim

This routine is not used anywhere else.

Signed-hostap Baruch Siach <baruch <at> tkos.co.il>
---

v2: declare accounting_sta_interim at the beginning of accounting.c instead of 
    moving it, to avoid a warning due to accounting_sta_report() not being 
    declared.

 src/ap/accounting.c |    5 ++++-
 src/ap/accounting.h |    1 -
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/ap/accounting.c b/src/ap/accounting.c
index 2c3a6d9..4b923ef 100644
--- a/src/ap/accounting.c
+++ b/src/ap/accounting.c
 <at>  <at>  -29,6 +29,8  <at>  <at> 
 static void accounting_sta_get_id(struct hostapd_data *hapd,
 				  struct sta_info *sta);

+static void accounting_sta_interim(struct hostapd_data *hapd,
+                   struct sta_info *sta);

 static struct radius_msg * accounting_msg(struct hostapd_data *hapd,
 					  struct sta_info *sta,
 <at>  <at>  -415,7 +417,8  <at>  <at>  static void accounting_sta_report(struct hostapd_data *hapd,
  *  <at> hapd: hostapd BSS data
  *  <at> sta: The station
  */
(Continue reading)

Jouni Malinen | 5 Aug 2012 18:42
Picon

Re: [PATCH v2] accounting: staticise accounting_sta_interim

On Sun, Aug 05, 2012 at 08:16:07AM +0300, Baruch Siach wrote:
> This routine is not used anywhere else.

Thanks, applied.

--

-- 
Jouni Malinen                                            PGP id EFC895FA

Gmane