Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ee/cmdHandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,6 @@ int pkoCmdIntrHandler()
static int
cmdThread()
{
void *pkt;
unsigned int cmd;
int ret;
int done;

Expand All @@ -752,6 +750,8 @@ cmdThread()

done = 0;
while (!done) {
unsigned int cmd;
void *pkt;
SleepThread();

cmd = ntohl(sifDmaDataPtr[1]);
Expand Down
18 changes: 7 additions & 11 deletions iop/cmdHandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,12 @@ pkoWriteMem(char *buf, int len)
static void
cmdListener(int sock)
{
int done;
int len;
int addrlen;
unsigned int cmd;
pko_pkt_hdr *header;
struct sockaddr_in remote_addr;

done = 0;

while (!done) {
while (1) {
struct sockaddr_in remote_addr;
int len;
int addrlen;
pko_pkt_hdr *header;
unsigned int cmd;

addrlen = sizeof(remote_addr);
len = recvfrom(sock, &recvbuf[0], BUF_SIZE, 0,
Expand Down Expand Up @@ -364,7 +360,6 @@ int cmdHandlerInit(void)
{
iop_thread_t thread;
int pid;
int ret;

dbgprintf("IOP cmd: Starting thread\n");

Expand All @@ -379,6 +374,7 @@ int cmdHandlerInit(void)

pid = CreateThread(&thread);
if (pid >= 0) {
int ret;
ret = StartThread(pid, 0);
if (ret < 0) {
dbgprintf("IOP cmd: Could not start thread\n");
Expand Down
6 changes: 3 additions & 3 deletions iop/net_fio.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ pko_lwip_send(int sock, void *buf, int len, int flag)
int pko_recv_bytes(int sock, char *buf, int bytes)
{
int left;
int len;

left = bytes;

while (left > 0) {
int len;
len = recv(sock, &buf[bytes - left], left, 0);
if (len < 0) {
dbgprintf("pko_file: pko_recv_bytes error!!\n");
Expand Down Expand Up @@ -694,8 +694,6 @@ int pko_file_serv(void *argv)
struct sockaddr_in server_addr;
struct sockaddr_in client_addr;
int sock;
int client_sock;
int client_len;
int ret;

dbgprintf(" - PS2 Side application -\n");
Expand Down Expand Up @@ -733,6 +731,8 @@ int pko_file_serv(void *argv)

// Connection loop
while (pko_fileio_active) {
int client_len;
int client_sock;
dbgprintf("Waiting for connection\n");

client_len = sizeof(client_addr);
Expand Down
2 changes: 1 addition & 1 deletion iop/net_fsys.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ static void fsysInit(iop_device_t *driver)
{
struct _iop_thread mythread;
int pid;
int i;

dbgprintf("initializing %s\n", driver->name);

Expand All @@ -69,6 +68,7 @@ static void fsysInit(iop_device_t *driver)
pid = CreateThread(&mythread);

if (pid > 0) {
int i;
if ((i = StartThread(pid, NULL)) < 0) {
printf("StartThread failed (%d)\n", i);
}
Expand Down