diff options
Diffstat (limited to 'plugins')
| -rwxr-xr-x | plugins/dfnet/dfnet.c | 16 | ||||
| -rwxr-xr-x | plugins/dfnet/dfnet.h | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/plugins/dfnet/dfnet.c b/plugins/dfnet/dfnet.c index d76a7574..fcd438b5 100755 --- a/plugins/dfnet/dfnet.c +++ b/plugins/dfnet/dfnet.c @@ -38,9 +38,9 @@ long CALLBACK NETinit() { return sockInit(); } -int SEND(const void *buf, int Size, int Mode) { - int bytes; - int count = 0; +size_t SEND(const void *buf, int Size, int Mode) { + long bytes; + long count = 0; const char *pData = (const char *)buf; if (Mode & PSE_NET_NONBLOCKING) { // NONBLOCKING @@ -69,9 +69,9 @@ int SEND(const void *buf, int Size, int Mode) { return count; } -int RECV(void *buf, int Size, int Mode) { - int bytes; - int count = 0; +size_t RECV(void *buf, int Size, int Mode) { + long bytes; + long count = 0; char *pData = (char *)buf; if (Mode & PSE_NET_NONBLOCKING) { // NONBLOCKING @@ -100,7 +100,7 @@ int RECV(void *buf, int Size, int Mode) { } long CALLBACK NETopen(unsigned long *gpuDisp) { - int ret = sockOpen(); + long ret = sockOpen(); struct sockaddr_in address; @@ -183,7 +183,7 @@ long CALLBACK NETopen(unsigned long *gpuDisp) { PadSendData = (char *)malloc(PadCountMax * 128); if (PadSendData == NULL) { - SysMessage(_("Error allocating memory!\n")); return -1; + SysMessage("%s", _("Error allocating memory!\n")); return -1; } memset(PadSendData, 0xff, PadCountMax); diff --git a/plugins/dfnet/dfnet.h b/plugins/dfnet/dfnet.h index aa8007c3..8f6094f8 100755 --- a/plugins/dfnet/dfnet.h +++ b/plugins/dfnet/dfnet.h @@ -75,7 +75,7 @@ Config conf; void LoadConf(); void SaveConf(); -long sock; +int sock; char *PadSendData; char *PadRecvData; char PadSendSize; @@ -100,7 +100,7 @@ int sockPing(); int ShowPauseDlg(); void SysMessage(const char *fmt, ...); -int SEND(const void *pData, int Size, int Mode); -int RECV(void *pData, int Size, int Mode); +size_t SEND(const void *pData, int Size, int Mode); +size_t RECV(void *pData, int Size, int Mode); #endif |
