diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2019-05-24 16:55:21 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2019-05-24 16:55:21 +0200 |
commit | 5ed6f6f6319986eec4d9715524a614f64a28f396 (patch) | |
tree | e9a3461173623d724369da446f1a85d4685f858e /src | |
parent | 55b6620fcc04a80bde58defaf0655e4dbf762d52 (diff) | |
download | merchant-5ed6f6f6319986eec4d9715524a614f64a28f396.tar.gz merchant-5ed6f6f6319986eec4d9715524a614f64a28f396.tar.bz2 merchant-5ed6f6f6319986eec4d9715524a614f64a28f396.zip |
rename
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/taler-merchant-httpd_parsing.c | 72 | ||||
-rw-r--r-- | src/lib/merchant_api_pay.c | 2 | ||||
-rw-r--r-- | src/lib/merchant_api_proposal.c | 2 | ||||
-rw-r--r-- | src/lib/merchant_api_refund.c | 2 | ||||
-rw-r--r-- | src/lib/merchant_api_tip_authorize.c | 2 | ||||
-rw-r--r-- | src/lib/merchant_api_tip_pickup.c | 2 |
6 files changed, 5 insertions, 77 deletions
diff --git a/src/backend/taler-merchant-httpd_parsing.c b/src/backend/taler-merchant-httpd_parsing.c index 98b1cd5c..743999df 100644 --- a/src/backend/taler-merchant-httpd_parsing.c +++ b/src/backend/taler-merchant-httpd_parsing.c @@ -67,38 +67,6 @@ struct Buffer }; -/** - * Initialize a buffer and copy first chunk of data in it. - * - * @param buf the buffer to initialize - * @param data the initial data - * @param data_size size of the initial data - * @param alloc_size size of the buffer - * @param max_size maximum size that the buffer can grow to - * @return a GNUnet result code - */ -static int -buffer_init (struct Buffer *buf, - const void *data, - size_t data_size, - size_t alloc_size, - size_t max_size) -{ - if (data_size > max_size || alloc_size > max_size) - return GNUNET_SYSERR; - if (data_size > alloc_size) - alloc_size = data_size; - if (0 == alloc_size) - { - buf->data = NULL; - return GNUNET_OK; - } - buf->data = GNUNET_malloc (alloc_size); - GNUNET_memcpy (buf->data, - data, - data_size); - return GNUNET_OK; -} /** @@ -115,46 +83,6 @@ buffer_deinit (struct Buffer *buf) } -/** - * Append data to a buffer, growing the buffer if necessary. - * - * @param buf the buffer to append to - * @param data the data to append - * @param data_size the size of @a data - * @param max_size maximum size that the buffer can grow to - * @return #GNUNET_OK on success, - * #GNUNET_NO if the buffer can't accomodate for the new data - */ -static int -buffer_append (struct Buffer *buf, - const void *data, - size_t data_size, - size_t max_size) -{ - if (buf->fill + data_size > max_size) - return GNUNET_NO; - if (data_size + buf->fill > buf->alloc) - { - char *new_buf; - size_t new_size = buf->alloc ? buf->alloc : 1; - - while (new_size < buf->fill + data_size) - new_size *= 2; - if (new_size > max_size) - return GNUNET_NO; - new_buf = GNUNET_malloc (new_size); - memcpy (new_buf, buf->data, buf->fill); - GNUNET_free (buf->data); - buf->data = new_buf; - buf->alloc = new_size; - } - memcpy (buf->data + buf->fill, - data, - data_size); - buf->fill += data_size; - return GNUNET_OK; -} - /** * Function called whenever we are done with a request diff --git a/src/lib/merchant_api_pay.c b/src/lib/merchant_api_pay.c index af7b8c91..e5836019 100644 --- a/src/lib/merchant_api_pay.c +++ b/src/lib/merchant_api_pay.c @@ -33,7 +33,7 @@ #include <taler/taler_json_lib.h> #include <taler/taler_signatures.h> #include <taler/taler_exchange_service.h> -#include <taler/teah_common.h> +#include <taler/taler_curl_lib.h> /** diff --git a/src/lib/merchant_api_proposal.c b/src/lib/merchant_api_proposal.c index fca87cb4..37fbc8cb 100644 --- a/src/lib/merchant_api_proposal.c +++ b/src/lib/merchant_api_proposal.c @@ -32,7 +32,7 @@ #include "taler_merchant_service.h" #include <taler/taler_json_lib.h> #include <taler/taler_signatures.h> -#include <taler/teah_common.h> +#include <taler/taler_curl_lib.h> /** diff --git a/src/lib/merchant_api_refund.c b/src/lib/merchant_api_refund.c index 294fce02..ab955860 100644 --- a/src/lib/merchant_api_refund.c +++ b/src/lib/merchant_api_refund.c @@ -30,7 +30,7 @@ #include "taler_merchant_service.h" #include <taler/taler_json_lib.h> #include <taler/taler_signatures.h> -#include <taler/teah_common.h> +#include <taler/taler_curl_lib.h> struct TALER_MERCHANT_RefundLookupOperation diff --git a/src/lib/merchant_api_tip_authorize.c b/src/lib/merchant_api_tip_authorize.c index 1a60d0a0..92864432 100644 --- a/src/lib/merchant_api_tip_authorize.c +++ b/src/lib/merchant_api_tip_authorize.c @@ -29,7 +29,7 @@ #include "taler_merchant_service.h" #include <taler/taler_json_lib.h> #include <taler/taler_signatures.h> -#include <taler/teah_common.h> +#include <taler/taler_curl_lib.h> /** diff --git a/src/lib/merchant_api_tip_pickup.c b/src/lib/merchant_api_tip_pickup.c index d323aef5..d3d0f669 100644 --- a/src/lib/merchant_api_tip_pickup.c +++ b/src/lib/merchant_api_tip_pickup.c @@ -29,7 +29,7 @@ #include "taler_merchant_service.h" #include <taler/taler_json_lib.h> #include <taler/taler_signatures.h> -#include <taler/teah_common.h> +#include <taler/taler_curl_lib.h> /** |