Date: Mon, 25 Jun 2012 19:59:08 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r237570 - user/adrian/ath_radar_stuff/src/pktlog Message-ID: <201206251959.q5PJx89r092296@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Mon Jun 25 19:59:08 2012 New Revision: 237570 URL: http://svn.freebsd.org/changeset/base/237570 Log: Don't print the pulse summary if it didn't parse correctly. Modified: user/adrian/ath_radar_stuff/src/pktlog/main.c Modified: user/adrian/ath_radar_stuff/src/pktlog/main.c ============================================================================== --- user/adrian/ath_radar_stuff/src/pktlog/main.c Mon Jun 25 19:13:43 2012 (r237569) +++ user/adrian/ath_radar_stuff/src/pktlog/main.c Mon Jun 25 19:59:08 2012 (r237570) @@ -46,6 +46,7 @@ pkt_handle(int chip, const char *pkt, in struct ieee80211_radiotap_header *rh; uint8_t rssi, nf; struct radar_entry re; + int r; /* XXX assume it's a radiotap frame */ rh = (struct ieee80211_radiotap_header *) pkt; @@ -85,16 +86,17 @@ pkt_handle(int chip, const char *pkt, in #endif if (chip == CHIP_AR5416) - ar5416_radar_decode(rh, pkt + rh->it_len, len - rh->it_len, + r = ar5416_radar_decode(rh, pkt + rh->it_len, len - rh->it_len, &re); else if (chip == CHIP_AR9280) - ar9280_radar_decode(rh, pkt + rh->it_len, len - rh->it_len, + r = ar9280_radar_decode(rh, pkt + rh->it_len, len - rh->it_len, &re); /* * TODO: Print the summary record */ - pkt_print(&re); + if (r) + pkt_print(&re); } static pcap_t *
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206251959.q5PJx89r092296>