diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-08-14 22:16:16 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-08-14 22:16:16 +0200 |
commit | f43699482a0a5921cb4cdc4bf110242278209ada (patch) | |
tree | ecef2ac0bbca45787e327c8fb8016ed393faae9b /libpiano/src/http.c | |
parent | 0ca626237aef1c8ae30c31aa5ec2de09d2f31c42 (diff) | |
download | pianobar-f43699482a0a5921cb4cdc4bf110242278209ada.tar.gz pianobar-f43699482a0a5921cb4cdc4bf110242278209ada.tar.bz2 pianobar-f43699482a0a5921cb4cdc4bf110242278209ada.zip |
waitress: Use dynamic allocated buffer for FetchBuf
Diffstat (limited to 'libpiano/src/http.c')
-rw-r--r-- | libpiano/src/http.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libpiano/src/http.c b/libpiano/src/http.c index f21b839..98b5e11 100644 --- a/libpiano/src/http.c +++ b/libpiano/src/http.c @@ -39,7 +39,7 @@ THE SOFTWARE. * @return _RET_OK or _RET_NET_ERROR */ PianoReturn_t PianoHttpPost (WaitressHandle_t *waith, const char *postData, - char *retData, size_t retDataSize) { + char **retData) { PianoReturn_t pRet = PIANO_RET_NET_ERROR; char *reqPostData = PianoEncryptString (postData); @@ -51,7 +51,7 @@ PianoReturn_t PianoHttpPost (WaitressHandle_t *waith, const char *postData, waith->postData = reqPostData; waith->method = WAITRESS_METHOD_POST; - if (WaitressFetchBuf (waith, retData, retDataSize) == WAITRESS_RET_OK) { + if (WaitressFetchBuf (waith, retData) == WAITRESS_RET_OK) { pRet = PIANO_RET_OK; } @@ -66,13 +66,12 @@ PianoReturn_t PianoHttpPost (WaitressHandle_t *waith, const char *postData, * @param buffer size * @return _RET_OK or _RET_NET_ERROR */ -PianoReturn_t PianoHttpGet (WaitressHandle_t *waith, char *retData, - size_t retDataSize) { +PianoReturn_t PianoHttpGet (WaitressHandle_t *waith, char **retData) { waith->extraHeaders = NULL; waith->postData = NULL; waith->method = WAITRESS_METHOD_GET; - if (WaitressFetchBuf (waith, retData, retDataSize) == WAITRESS_RET_OK) { + if (WaitressFetchBuf (waith, retData) == WAITRESS_RET_OK) { return PIANO_RET_OK; } return PIANO_RET_NET_ERROR; |