Compile with latest wut and WUPS 0.5

This commit is contained in:
Maschell 2021-04-17 14:22:19 +02:00
parent 2b3479998a
commit e7513c3862
3 changed files with 18 additions and 8 deletions

View File

@ -1,7 +1,7 @@
FROM wiiuenv/devkitppc:20210101 FROM wiiuenv/devkitppc:20210414
COPY --from=wiiuenv/libwupsbackend:202101101720554d1bfe /artifacts $DEVKITPRO COPY --from=wiiuenv/libwupsbackend:202101101720554d1bfe /artifacts $DEVKITPRO
COPY --from=wiiuenv/librpxloader:20210116 /artifacts $DEVKITPRO COPY --from=wiiuenv/librpxloader:20210116 /artifacts $DEVKITPRO
COPY --from=wiiuenv/wiiupluginsystem:20210316 /artifacts $DEVKITPRO COPY --from=wiiuenv/wiiupluginsystem:20210417 /artifacts $DEVKITPRO
WORKDIR project WORKDIR project

View File

@ -67,12 +67,12 @@ void TcpReceiver::executeThread() {
socklen_t len; socklen_t len;
int32_t ret; int32_t ret;
if ((ret = bind(serverSocket, (struct sockaddr *) &bindAddress, 16)) < 0) { if ((ret = bind(serverSocket, (struct sockaddr *) &bindAddress, 16)) < 0) {
socketclose(serverSocket); close(serverSocket);
return; return;
} }
if ((ret = listen(serverSocket, 1)) < 0) { if ((ret = listen(serverSocket, 1)) < 0) {
socketclose(serverSocket); close(serverSocket);
return; return;
} }
@ -88,19 +88,19 @@ void TcpReceiver::executeThread() {
//serverReceiveStart(this, ipAddress); //serverReceiveStart(this, ipAddress);
int32_t result = loadToMemory(clientSocket, ipAddress); int32_t result = loadToMemory(clientSocket, ipAddress);
//serverReceiveFinished(this, ipAddress, result); //serverReceiveFinished(this, ipAddress, result);
socketclose(clientSocket); close(clientSocket);
if (result > 0) if (result > 0)
if (result >= 0){ if (result >= 0){
break; break;
} }
} else { } else {
DEBUG_FUNCTION_LINE("Server socket accept failed %i %d", clientSocket, wiiu_geterrno()); DEBUG_FUNCTION_LINE("Server socket accept failed %i %d", clientSocket, errno);
OSSleepTicks(OSMicrosecondsToTicks(100000)); OSSleepTicks(OSMicrosecondsToTicks(100000));
} }
} }
socketclose(serverSocket); close(serverSocket);
} }

View File

@ -2,12 +2,22 @@
#define _UTILS_NET_H_ #define _UTILS_NET_H_
#include <stdint.h> #include <stdint.h>
#include <nsysnet/socket.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdint.h>
#include <stdbool.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
int32_t recvwait(int32_t sock, void *buffer, int32_t len); int32_t recvwait(int32_t sock, void *buffer, int32_t len);
uint8_t recvbyte(int32_t sock); uint8_t recvbyte(int32_t sock);