Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/wpa/dist/src/ap avoid preprocessor directives i...



details:   https://anonhg.NetBSD.org/src/rev/3f670ddd90ca
branches:  trunk
changeset: 762767:3f670ddd90ca
user:      plunky <plunky%NetBSD.org@localhost>
date:      Sun Feb 27 18:07:42 2011 +0000

description:
avoid preprocessor directives in macro arguments

has been committed upstream at

    
http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=blobdiff;f=src/ap/wpa_auth.c;h=7ad60a23d999082a00e9be672d4b55a19c46a4bb;hp=13e8ec43895a67d6d825b5c2a199499232dbafcb;hb=8ce58ceb250f101ee66682a4149cc652a30a74da;hpb=73304dbf65c3da859b1c51e6be32457e9ec9932d

diffstat:

 external/bsd/wpa/dist/src/ap/wpa_auth.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 807c4c5b8391 -r 3f670ddd90ca external/bsd/wpa/dist/src/ap/wpa_auth.c
--- a/external/bsd/wpa/dist/src/ap/wpa_auth.c   Sun Feb 27 18:01:28 2011 +0000
+++ b/external/bsd/wpa/dist/src/ap/wpa_auth.c   Sun Feb 27 18:07:42 2011 +0000
@@ -2327,19 +2327,21 @@
 {
        int len = 0, ret;
        char pmkid_txt[PMKID_LEN * 2 + 1];
+#ifdef CONFIG_RSN_PREAUTH
+       const int preauth = 1;
+#else /* CONFIG_RSN_PREAUTH */
+       const int preauth = 0;
+#endif /* CONFIG_RSN_PREAUTH */
 
        if (wpa_auth == NULL)
                return len;
 
        ret = os_snprintf(buf + len, buflen - len,
                          "dot11RSNAOptionImplemented=TRUE\n"
-#ifdef CONFIG_RSN_PREAUTH
-                         "dot11RSNAPreauthenticationImplemented=TRUE\n"
-#else /* CONFIG_RSN_PREAUTH */
-                         "dot11RSNAPreauthenticationImplemented=FALSE\n"
-#endif /* CONFIG_RSN_PREAUTH */
+                         "dot11RSNAPreauthenticationImplemented=%s\n"
                          "dot11RSNAEnabled=%s\n"
                          "dot11RSNAPreauthenticationEnabled=%s\n",
+                         wpa_bool_txt(preauth),
                          wpa_bool_txt(wpa_auth->conf.wpa & WPA_PROTO_RSN),
                          wpa_bool_txt(wpa_auth->conf.rsn_preauth));
        if (ret < 0 || (size_t) ret >= buflen - len)



Home | Main Index | Thread Index | Old Index