2009/11/12 Jorge Arellano Cid <jcid@dillo.org>:
On Thu, Nov 12, 2009 at 07:54:25AM +0900, furaisanjin wrote:
Hi.
My problem also seems to be fixed because it's very harder to reproduce the problem now.
?Is still possible to trigger the problem (but very hard)?
I have no idea but the problem did happen in one hour but now it's very difficult to make it happen.
By the way, I'm a bit wondering this code and I suppose something like this.
--- dillo/src/IO/dpi.c ?2009-11-11 05:51:28.000000000 +0900 +++ dillo-test/src/IO/dpi.c ? ? 2009-11-11 22:05:42.000000000 +0900 @@ -793,12 +793,15 @@ char *a_Dpi_send_blocking_cmd(const char
? ? if ((sock_fd = Dpi_connect_socket(server_name, TRUE)) == -1) { ? ? ? ?MSG_ERR("[a_Dpi_send_blocking_cmd] Can't connect to server.\n"); - ? } else if (Dpi_blocking_write(sock_fd, cmd, strlen(cmd)) == -1) { - ? ? ?MSG_ERR("[a_Dpi_send_blocking_cmd] Can't send message.\n"); - ? } if ((ret = Dpi_blocking_read(sock_fd)) == NULL) { - ? ? ?MSG_ERR("[a_Dpi_send_blocking_cmd] Can't read message.\n"); + ? } else { + ? ? if (Dpi_blocking_write(sock_fd, cmd, strlen(cmd)) == -1) { + ? ? ? MSG_ERR("[a_Dpi_send_blocking_cmd] Can't send message.\n"); + ? ? } + ? ? if ((ret = Dpi_blocking_read(sock_fd)) == NULL) { + ? ? ? MSG_ERR("[a_Dpi_send_blocking_cmd] Can't read message.\n"); + ? ? } + ? ? Dpi_close_fd(sock_fd); ? ? } - ? Dpi_close_fd(sock_fd);
?Dpi_close_fd() checks fd != -1 so AFAIS it's OK.
I meant Dpi_blocking_read as well. Regards, furaisanjin