From 8a19989b7e6e5084f179fe5d08256be619968d7b Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Mon, 22 Sep 2014 04:57:50 +0000 Subject: [PATCH] Working ... FossilOrigin-Name: 76683772133379e4ebd35973998048a7dfc1f5ff63deb2182f849c1390c67a92 --- src/wtp/Makefile | 1 + src/wtp/enum2array.php | 49 +++++++++++++++++++++++++++++++---------- src/wtp/nlt.h | 4 +++- src/wtp/nlt_attrnames.c | 8 +++---- src/wtp/wtp_main.c | 6 ++--- 5 files changed, 47 insertions(+), 21 deletions(-) diff --git a/src/wtp/Makefile b/src/wtp/Makefile index f25025a0..98c15f44 100644 --- a/src/wtp/Makefile +++ b/src/wtp/Makefile @@ -101,6 +101,7 @@ OBJS += $(CONFOBJS) OBJS += nlt_attrnames.o +OBJS += nlt_cmdnames.o #OBJS += $(HA_FILES) diff --git a/src/wtp/enum2array.php b/src/wtp/enum2array.php index 21e01aec..805eb570 100644 --- a/src/wtp/enum2array.php +++ b/src/wtp/enum2array.php @@ -1,22 +1,47 @@ NL80211_CMD_MAX? "Unknown": nlt_cmdnames[cmd]) #endif diff --git a/src/wtp/nlt_attrnames.c b/src/wtp/nlt_attrnames.c index 53941b73..6412dc65 100644 --- a/src/wtp/nlt_attrnames.c +++ b/src/wtp/nlt_attrnames.c @@ -1,10 +1,8 @@ -#include "nlt.h" - /* - Generated by php + Generated by enum2array.php Do not modify */ -const char * nlt_attrnames[] = { +char * nlt_attrnames[] = { "NL80211_ATTR_UNSPEC", "NL80211_ATTR_WIPHY", "NL80211_ATTR_WIPHY_NAME", @@ -212,4 +210,4 @@ const char * nlt_attrnames[] = { "NL80211_ATTR_IFACE_SOCKET_OWNER", "NL80211_ATTR_CSA_C_OFFSETS_TX", "NL80211_ATTR_MAX_CSA_COUNTERS" -}; +}; \ No newline at end of file diff --git a/src/wtp/wtp_main.c b/src/wtp/wtp_main.c index 7ed374d2..41a24149 100644 --- a/src/wtp/wtp_main.c +++ b/src/wtp/wtp_main.c @@ -57,8 +57,6 @@ const char * interfaces[]={ int main() { - gr(); - exit(0); wtp_main(); } @@ -93,7 +91,9 @@ int do_connect(void *priv,void *data) int wtp_main(const char *ad) { - cw_dbg_opt_level = DBG_DTLS | DBG_CW_INFO | DBG_ALL; + cw_dbg_opt_level = DBG_DTLS | DBG_CW_INFO | DBG_ALL; + gr(); + exit(0); wtpconf_preinit();