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.

This commit is contained in:
yellows8 2015-10-29 15:21:08 -04:00
parent 9360cd6a7d
commit 27469de3c1
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ typedef enum{
Result httpcInit(); Result httpcInit();
void httpcExit(); 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 httpcCloseContext(httpcContext *context);
Result httpcAddRequestHeaderField(httpcContext *context, char* name, char* value); Result httpcAddRequestHeaderField(httpcContext *context, char* name, char* value);
Result httpcBeginRequest(httpcContext *context); Result httpcBeginRequest(httpcContext *context);

View File

@ -13,8 +13,6 @@ Result httpcInit()
if(__httpc_servhandle)return 0; if(__httpc_servhandle)return 0;
if((ret=srvGetServiceHandle(&__httpc_servhandle, "http:C")))return ret; if((ret=srvGetServiceHandle(&__httpc_servhandle, "http:C")))return ret;
//*((u32*)0x600) = __httpc_servhandle;
ret = HTTPC_Initialize(__httpc_servhandle); ret = HTTPC_Initialize(__httpc_servhandle);
if(ret!=0)return ret; if(ret!=0)return ret;
@ -26,6 +24,8 @@ void httpcExit()
if(__httpc_servhandle==0)return; if(__httpc_servhandle==0)return;
svcCloseHandle(__httpc_servhandle); svcCloseHandle(__httpc_servhandle);
__httpc_servhandle = 0;
} }
Result httpcOpenContext(httpcContext *context, char* url, u32 use_defaultproxy) Result httpcOpenContext(httpcContext *context, char* url, u32 use_defaultproxy)