eve-flow: fix -Wshadow warning

pull/2432/head
Victor Julien 10 years ago
parent 9477fd4628
commit d893bc55e0

@ -289,46 +289,46 @@ static void JsonFlowLogJSON(JsonFlowLogThread *aft, json_t *js, Flow *f)
JsonTcpFlags(ssn ? ssn->tcp_packet_flags : 0, tjs); JsonTcpFlags(ssn ? ssn->tcp_packet_flags : 0, tjs);
if (ssn) { if (ssn) {
char *state = NULL; char *tcp_state = NULL;
switch (ssn->state) { switch (ssn->state) {
case TCP_NONE: case TCP_NONE:
state = "none"; tcp_state = "none";
break; break;
case TCP_LISTEN: case TCP_LISTEN:
state = "listen"; tcp_state = "listen";
break; break;
case TCP_SYN_SENT: case TCP_SYN_SENT:
state = "syn_sent"; tcp_state = "syn_sent";
break; break;
case TCP_SYN_RECV: case TCP_SYN_RECV:
state = "syn_recv"; tcp_state = "syn_recv";
break; break;
case TCP_ESTABLISHED: case TCP_ESTABLISHED:
state = "established"; tcp_state = "established";
break; break;
case TCP_FIN_WAIT1: case TCP_FIN_WAIT1:
state = "fin_wait1"; tcp_state = "fin_wait1";
break; break;
case TCP_FIN_WAIT2: case TCP_FIN_WAIT2:
state = "fin_wait2"; tcp_state = "fin_wait2";
break; break;
case TCP_TIME_WAIT: case TCP_TIME_WAIT:
state = "time_wait"; tcp_state = "time_wait";
break; break;
case TCP_LAST_ACK: case TCP_LAST_ACK:
state = "last_ack"; tcp_state = "last_ack";
break; break;
case TCP_CLOSE_WAIT: case TCP_CLOSE_WAIT:
state = "close_wait"; tcp_state = "close_wait";
break; break;
case TCP_CLOSING: case TCP_CLOSING:
state = "closing"; tcp_state = "closing";
break; break;
case TCP_CLOSED: case TCP_CLOSED:
state = "closed"; tcp_state = "closed";
break; break;
} }
json_object_set_new(tjs, "state", json_string(state)); json_object_set_new(tjs, "state", json_string(tcp_state));
} }
json_object_set_new(js, "tcp", tjs); json_object_set_new(js, "tcp", tjs);

Loading…
Cancel
Save