Merge branch 'master' into devop_socket
Conflicts: libctru/source/services/soc/soc_ioctl.c
This commit is contained in:
commit
71a59a1da3
@ -39,7 +39,7 @@ typedef volatile s64 vs64;
|
||||
|
||||
typedef u32 Handle;
|
||||
typedef s32 Result;
|
||||
typedef void (*ThreadFunc)(u32);
|
||||
typedef void (*ThreadFunc)(void *);
|
||||
|
||||
#define BIT(n) (1U<<(n))
|
||||
|
||||
|
@ -565,6 +565,7 @@ sdmc_stat(struct _reent *r,
|
||||
st->st_uid = 1;
|
||||
st->st_gid = 2;
|
||||
st->st_mode = S_IFDIR | S_IWUSR | S_IWGRP | S_IWOTH | S_IRUSR | S_IRGRP | S_IROTH;
|
||||
FSFILE_Close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,7 @@ static bool __handle_incoming_parameter() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void aptEventHandler(u32 arg)
|
||||
void aptEventHandler(void *arg)
|
||||
{
|
||||
bool runThread = true;
|
||||
|
||||
|
@ -410,7 +410,7 @@ Result csndPlaySound(int chn, u32 flags, u32 sampleRate, void* data0, void* data
|
||||
if (data0) paddr0 = osConvertVirtToPhys((u32)data0);
|
||||
if (data1) paddr1 = osConvertVirtToPhys((u32)data1);
|
||||
|
||||
if (encoding == CSND_ENCODING_ADPCM)
|
||||
if (data0 && encoding == CSND_ENCODING_ADPCM)
|
||||
{
|
||||
int adpcmSample = ((s16*)data0)[-2];
|
||||
int adpcmIndex = ((u8*)data0)[-2];
|
||||
|
@ -21,7 +21,7 @@ Handle gspEventThread;
|
||||
static Handle gspEvent;
|
||||
static vu8* gspEventData;
|
||||
|
||||
static void gspEventThreadMain(u32 arg);
|
||||
static void gspEventThreadMain(void *arg);
|
||||
|
||||
|
||||
Result gspInit()
|
||||
@ -82,7 +82,7 @@ void gspWaitForEvent(GSP_Event id, bool nextEvent)
|
||||
svcClearEvent(gspEvents[id]);
|
||||
}
|
||||
|
||||
void gspEventThreadMain(u32 arg)
|
||||
void gspEventThreadMain(void *arg)
|
||||
{
|
||||
while (gspRunEvents)
|
||||
{
|
||||
|
@ -43,8 +43,8 @@ Result httpcOpenContext(httpcContext *context, char* url, u32 use_defaultproxy)
|
||||
|
||||
ret = HTTPC_InitializeConnectionSession(context->servhandle, context->httphandle);
|
||||
if(ret!=0) {
|
||||
HTTPC_CloseContext(__httpc_servhandle, context->httphandle);
|
||||
svcCloseHandle(context->servhandle);
|
||||
HTTPC_CloseContext(__httpc_servhandle, context->httphandle);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -52,8 +52,8 @@ Result httpcOpenContext(httpcContext *context, char* url, u32 use_defaultproxy)
|
||||
|
||||
ret = HTTPC_SetProxyDefault(context->servhandle, context->httphandle);
|
||||
if(ret!=0) {
|
||||
HTTPC_CloseContext(__httpc_servhandle, context->httphandle);
|
||||
svcCloseHandle(context->servhandle);
|
||||
HTTPC_CloseContext(__httpc_servhandle, context->httphandle);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -64,8 +64,8 @@ Result httpcCloseContext(httpcContext *context)
|
||||
{
|
||||
Result ret=0;
|
||||
|
||||
ret = HTTPC_CloseContext(context->servhandle, context->httphandle);
|
||||
svcCloseHandle(context->servhandle);
|
||||
ret = HTTPC_CloseContext(__httpc_servhandle, context->httphandle);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -216,16 +216,16 @@ Result HTTPC_AddRequestHeaderField(Handle handle, Handle contextHandle, char* na
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
|
||||
int l1=strlen(name)+1;
|
||||
int l2=strlen(value)+1;
|
||||
int name_len=strlen(name)+1;
|
||||
int value_len=strlen(value)+1;
|
||||
|
||||
cmdbuf[0]=0x1100c4; //request header code
|
||||
cmdbuf[1]=contextHandle;
|
||||
cmdbuf[2]=l1;
|
||||
cmdbuf[3]=l2;
|
||||
cmdbuf[4]=(l1<<14)|0xC02;
|
||||
cmdbuf[2]=name_len;
|
||||
cmdbuf[3]=value_len;
|
||||
cmdbuf[4]=(name_len<<14)|0xC02;
|
||||
cmdbuf[5]=(u32)name;
|
||||
cmdbuf[6]=(l1<<4)|0xA;
|
||||
cmdbuf[6]=(value_len<<4)|0xA;
|
||||
cmdbuf[7]=(u32)value;
|
||||
|
||||
Result ret=0;
|
||||
|
@ -25,7 +25,7 @@ int ioctl(int sockfd, int request, ...)
|
||||
|
||||
if(value == NULL) {
|
||||
errno = EFAULT;
|
||||
ret = -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
flags = fcntl(sockfd, F_GETFL, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user