From 27469de3c165042b7760958e1a0918e88fa4a418 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Thu, 29 Oct 2015 15:21:08 -0400 Subject: [PATCH 1/3] Removed an unused debug line in httpc.c. Set the httpc servhandle to zero in httpcExit(), this fixes using httpcInit() after httpcExit(). Fixed the use_defaultproxy comment in httpc.h. --- libctru/include/3ds/services/httpc.h | 2 +- libctru/source/services/httpc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libctru/include/3ds/services/httpc.h b/libctru/include/3ds/services/httpc.h index 4a16702..27e0fed 100644 --- a/libctru/include/3ds/services/httpc.h +++ b/libctru/include/3ds/services/httpc.h @@ -15,7 +15,7 @@ typedef enum{ Result httpcInit(); void httpcExit(); -Result httpcOpenContext(httpcContext *context, char* url, u32 use_defaultproxy);//use_defaultproxy should be zero normally, unless you don't want HTTPC_SetProxyDefault() to be used automatically. +Result httpcOpenContext(httpcContext *context, char* url, u32 use_defaultproxy);//use_defaultproxy should be non-zero normally, unless you don't want HTTPC_SetProxyDefault() to be used automatically. Result httpcCloseContext(httpcContext *context); Result httpcAddRequestHeaderField(httpcContext *context, char* name, char* value); Result httpcBeginRequest(httpcContext *context); diff --git a/libctru/source/services/httpc.c b/libctru/source/services/httpc.c index c8863e8..a8a07ba 100644 --- a/libctru/source/services/httpc.c +++ b/libctru/source/services/httpc.c @@ -13,8 +13,6 @@ Result httpcInit() if(__httpc_servhandle)return 0; if((ret=srvGetServiceHandle(&__httpc_servhandle, "http:C")))return ret; - //*((u32*)0x600) = __httpc_servhandle; - ret = HTTPC_Initialize(__httpc_servhandle); if(ret!=0)return ret; @@ -26,6 +24,8 @@ void httpcExit() if(__httpc_servhandle==0)return; svcCloseHandle(__httpc_servhandle); + + __httpc_servhandle = 0; } Result httpcOpenContext(httpcContext *context, char* url, u32 use_defaultproxy) From facb701ae9007e20e71b7afde29b2d4932bcf061 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Thu, 29 Oct 2015 15:27:39 -0400 Subject: [PATCH 2/3] Fixed the use_defaultproxy value used by the http example. --- examples/http/source/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/http/source/main.c b/examples/http/source/main.c index 2ef2bbe..5c2c43e 100644 --- a/examples/http/source/main.c +++ b/examples/http/source/main.c @@ -76,7 +76,7 @@ int main() printf("Downloading %s\n",url); gfxFlushBuffers(); - ret = httpcOpenContext(&context, url , 0); + ret = httpcOpenContext(&context, url, 1); printf("return from httpcOpenContext: %"PRId32"\n",ret); gfxFlushBuffers(); From 6b40ea9d8edbc90a81441e3284382c6a499f3190 Mon Sep 17 00:00:00 2001 From: fincs Date: Sun, 1 Nov 2015 13:59:34 +0100 Subject: [PATCH 3/3] Roll out a new libctru build --- libctru/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libctru/Makefile b/libctru/Makefile index b2b40d3..a9ab4da 100644 --- a/libctru/Makefile +++ b/libctru/Makefile @@ -9,7 +9,7 @@ endif include $(DEVKITARM)/base_rules export LIBCTRU_MAJOR := 0 -export LIBCTRU_MINOR := 5 +export LIBCTRU_MINOR := 6 export LIBCTRU_PATCH := 0