diff options
author | Bill Meier <wmeier@newsguy.com> | 2015-01-19 15:38:29 -0500 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2015-01-19 20:51:36 +0000 |
commit | 0dcb91dd85b118419471b6caac9ad8dbd013e936 (patch) | |
tree | 4fb807c0a218e06f0e9de7e38d15ef473dc140a3 | |
parent | 5fa13c6a1923e2e3cb7c712c845248207decb1e5 (diff) |
synphasor: (trivial) Do dissector_add_uint("rtacser.data",...) only once
and not each time prefs are changed.
Also: do minor whitespace changes.
Change-Id: I04bfc212e288473a78113e8b124ce4a13ad74ad1
Reviewed-on: https://code.wireshark.org/review/6663
Reviewed-by: Bill Meier <wmeier@newsguy.com>
-rw-r--r-- | epan/dissectors/packet-synphasor.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/epan/dissectors/packet-synphasor.c b/epan/dissectors/packet-synphasor.c index 34bf59df33..95414aadd8 100644 --- a/epan/dissectors/packet-synphasor.c +++ b/epan/dissectors/packet-synphasor.c @@ -144,16 +144,16 @@ typedef struct { /* holds information required to dissect a single PMU block in a data frame */ typedef struct { - guint16 id; /* identifies source of block */ - char name[CHNAM_LEN + 1]; /* holds STN */ - data_format format_fr; /* data format of FREQ and DFREQ */ - data_format format_ph; /* data format of PHASORS */ - data_format format_an; /* data format of ANALOG */ - phasor_notation_e phasor_notation; /* format of the phasors */ - guint fnom; /* nominal line frequency */ - guint num_dg; /* number of digital status words */ - wmem_array_t *phasors; /* array of phasor_infos */ - wmem_array_t *analogs; /* array of analog_infos */ + guint16 id; /* identifies source of block */ + char name[CHNAM_LEN + 1]; /* holds STN */ + data_format format_fr; /* data format of FREQ and DFREQ */ + data_format format_ph; /* data format of PHASORS */ + data_format format_an; /* data format of ANALOG */ + phasor_notation_e phasor_notation; /* format of the phasors */ + guint fnom; /* nominal line frequency */ + guint num_dg; /* number of digital status words */ + wmem_array_t *phasors; /* array of phasor_infos */ + wmem_array_t *analogs; /* array of analog_infos */ } config_block; /* holds the id the configuration comes from an and @@ -1321,7 +1321,7 @@ void proto_reg_handoff_synphasor(void) if (!initialized) { synphasor_tcp_handle = new_create_dissector_handle(dissect_tcp, proto_synphasor); - + dissector_add_uint("rtacser.data", RTACSER_PAYLOAD_SYNPHASOR, synphasor_udp_handle); initialized = TRUE; } else { @@ -1335,7 +1335,6 @@ void proto_reg_handoff_synphasor(void) dissector_add_uint("udp.port", current_udp_port, synphasor_udp_handle); dissector_add_uint("tcp.port", current_tcp_port, synphasor_tcp_handle); - dissector_add_uint("rtacser.data", RTACSER_PAYLOAD_SYNPHASOR, synphasor_udp_handle); } /* proto_reg_handoff_synphasor() */ /* |