diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-08-08 13:20:52 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-08-08 14:11:06 +0000 |
commit | 39ad1bfa416a805b5792e24f0713a21f35fb3578 (patch) | |
tree | 4ad99e61d8e261c25987e5294324964098b48556 /epan | |
parent | b703f479bceabb4223cb380a9000512522f8cdbe (diff) | |
download | wireshark-39ad1bfa416a805b5792e24f0713a21f35fb3578.tar.gz |
NCP2222(.inc): fix indent (use 4 spaces)
Change-Id: I8161423ae270f685c28003eac36adf15be83c5fd
Reviewed-on: https://code.wireshark.org/review/9922
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ncp2222.inc | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc index 848e94326f..dc7927b0fb 100644 --- a/epan/dissectors/packet-ncp2222.inc +++ b/epan/dissectors/packet-ncp2222.inc @@ -1747,7 +1747,7 @@ ncp_hash_insert(conversation_t *conversation, guint8 nw_sequence, a reply to it. */ request_key = wmem_new(wmem_file_scope(), ncp_req_hash_key); request_key->conversation = conversation; - /* Make sequence number unique */ + /* Make sequence number unique */ request_key->nw_sequence_long = (0x10000 + ((pkt_num/255)<<16)) | nw_sequence; request_value = wmem_new0(wmem_file_scope(), ncp_req_hash_value); @@ -1788,28 +1788,27 @@ static ncp_req_hash_value* ncp_hash_lookup(conversation_t *conversation, guint8 nw_sequence, guint32 pkt_num) { ncp_req_hash_key request_key; - ncp_req_hash_value *temp_value; + ncp_req_hash_value *temp_value; request_key.conversation = conversation; - /* Find unique sequence number */ + /* Find unique sequence number */ request_key.nw_sequence_long = (0x10000+((pkt_num/255)<<16)) | nw_sequence; - /* Since masking of sequence number utilizes the packet number as - * part of it's algorythm it is possible for a packet to sit right - * on the boundary and fail. (depending on number of packets in trace) - * Loop through all the previous sequence numbers in the hash to see - * if the original request packet can be found. - */ - temp_value = (ncp_req_hash_value *)g_hash_table_lookup(ncp_req_hash, &request_key); - while(!temp_value) - { + /* Since masking of sequence number utilizes the packet number as + * part of it's algorythm it is possible for a packet to sit right + * on the boundary and fail. (depending on number of packets in trace) + * Loop through all the previous sequence numbers in the hash to see + * if the original request packet can be found. + */ + temp_value = (ncp_req_hash_value *)g_hash_table_lookup(ncp_req_hash, &request_key); + while(!temp_value) + { request_key.nw_sequence_long = request_key.nw_sequence_long-0x10000; - if((request_key.nw_sequence_long & 0xffff0000) == 0){ - break; - } + if((request_key.nw_sequence_long & 0xffff0000) == 0){ + break; + } temp_value = (ncp_req_hash_value *)g_hash_table_lookup(ncp_req_hash, &request_key); - } - + } return temp_value; } @@ -2946,8 +2945,8 @@ trap_for_expert_event(proto_tree *ncp_tree, packet_info *pinfo, const ncp_record char p_min_ver[3]="\0"; char p_rev[3]="\0"; char p_lang[3]="\0"; - char p_serv_type[3]="\0"; - char p_kernel[3]="\0"; + char p_serv_type[3]="\0"; + char p_kernel[3]="\0"; /* Get Server name and version info */ build_expert_data(ncp_tree, "ncp.server_name", @@ -8951,7 +8950,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo, request_value = ncp_hash_lookup(conversation, sequence, pinfo->fd->num); - } + } if (request_value) { ncp_rec = request_value->ncp_rec; } |