Fix build

This commit is contained in:
pancake 2012-10-25 21:56:42 +02:00
parent 1f15df18c4
commit 61b0f8e78a
4 changed files with 6 additions and 6 deletions

View File

@ -103,7 +103,7 @@ static int runfile () {
if (p) {
RSocket *fd = r_socket_new (0);
*p=0;
if (!r_socket_connect_tcp (fd, _connect, p+1)) {
if (!r_socket_connect_tcp (fd, _connect, p+1, 30)) {
eprintf ("Cannot connect\n");
return 1;
}

View File

@ -45,7 +45,7 @@ static RIODesc *__open(RIO *io, const char *file, int rw, int mode) {
return NULL;
}
_fd = r_socket_new (R_FALSE);
if (_fd && r_socket_connect_tcp (_fd, host, port)) {
if (_fd && r_socket_connect_tcp (_fd, host, port, 30)) {
riog = R_NEW (RIOGdb);
riog->fd = _fd;
riog->desc = gdbwrap_init (_fd->fd, NUM_REGS, 4);

View File

@ -91,7 +91,7 @@ static RIODesc *haret__open(struct r_io_t *io, const char *pathname, int rw, int
eprintf ("Cannot create new socket\n");
return NULL;
}
if (!r_socket_connect_tcp (s, ptr, port)) {
if (!r_socket_connect_tcp (s, ptr, port, 30)) {
eprintf ("Cannot connect to '%s' (%s)\n", ptr, port);
return NULL;
} else eprintf ("Connected to: %s at port %s\n", ptr, port);

View File

@ -176,7 +176,7 @@ static RIODesc *rap__open(struct r_io_t *io, const char *pathname, int rw, int m
eprintf ("Cannot create new socket\n");
return NULL;
}
if (r_socket_connect_tcp (rap_fd, ptr, port) == R_FALSE) {
if (r_socket_connect_tcp (rap_fd, ptr, port, 30) == R_FALSE) {
eprintf ("Cannot connect to '%s' (%d)\n", ptr, p);
r_socket_free (rap_fd);
return NULL;
@ -208,14 +208,14 @@ static RIODesc *rap__open(struct r_io_t *io, const char *pathname, int rw, int m
r_socket_read (rap_fd, (ut8 *)&buf, 4);
r_mem_copyendian ((ut8 *)&i, (ut8*)buf, 4, ENDIAN);
while (i>0) {
n = r_socket_read (rap_fd, (ut8 *)&buf, i);
int n = r_socket_read (rap_fd, (ut8 *)&buf, i);
if (n<1) break;
buf[i] = 0;
io->core_cmd_cb (io->user, buf);
n = r_socket_read (rap_fd, (ut8 *)&buf, 4);
if (n<1) break;
r_mem_copyendian ((ut8 *)&i, (ut8*)buf, 4, ENDIAN);
i -= data;
i -= n;
}
} else {
r_socket_free (rap_fd);