Skip to content

Commit e789c3c

Browse files
committed
fix bug
wrong position of if statement
1 parent 2e70312 commit e789c3c

File tree

1 file changed

+1
-2
lines changed
  • android_app/app/src/main/cpp

1 file changed

+1
-2
lines changed

android_app/app/src/main/cpp/tcp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,13 @@ void check_tcp_socket(const struct arguments *args,
274274
} else {
275275
if (s->tcp.connect_sent == TCP_CONNECT_SENT) {
276276
buffer[bytes] = '\0';
277+
if (strcmp(buffer, "HTTP/1.0 200") == 0 || strcmp(buffer, "HTTP/1.1 200") == 0) {
277278
s->tcp.connect_sent = TCP_CONNECT_ESTABLISHED;
278279
while (recv(s->socket, buffer, sizeof(buffer), 0) > 0) {}
279280
s->tcp.state = TCP_SYN_RECV;
280281
} else {
281282
write_rst(args, &s->tcp);
282283
}
283-
if (strcmp(buffer, "HTTP/1.0 200") == 0 || strcmp(buffer, "HTTP/1.1 200") == 0) {
284-
285284
}
286285
}
287286
} else {

0 commit comments

Comments
 (0)