| @@ -242,14 +242,14 @@ recv_thread(void *arg __unused) | |||||
| ggio.gctl_length = hdr.gh_length; | ggio.gctl_length = hdr.gh_length; | ||||
| ggio.gctl_error = hdr.gh_error; | ggio.gctl_error = hdr.gh_error; | ||||
| if (ggio.gctl_length > buflen) { | |||||
| g_gate_log(LOG_ERR, "Received too large data, %llu.", ggio.gctl_length); | |||||
| reconnect = 1; | |||||
| pthread_kill(sendtd, SIGUSR1); | |||||
| break; | |||||
| } | |||||
| if (ggio.gctl_error == 0 && ggio.gctl_cmd == GGATE_CMD_READ) { | if (ggio.gctl_error == 0 && ggio.gctl_cmd == GGATE_CMD_READ) { | ||||
| if (ggio.gctl_length > buflen) { | |||||
| g_gate_log(LOG_ERR, "Received too large data, %llu.", ggio.gctl_length); | |||||
| reconnect = 1; | |||||
| pthread_kill(sendtd, SIGUSR1); | |||||
| break; | |||||
| } | |||||
| data = g_gate_recv(recvfd, ggio.gctl_data, | data = g_gate_recv(recvfd, ggio.gctl_data, | ||||
| ggio.gctl_length, MSG_WAITALL); | ggio.gctl_length, MSG_WAITALL); | ||||
| if (reconnect) | if (reconnect) | ||||