diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-19 20:03:22 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-19 20:03:22 +0200 |
| commit | 3e85a8e6db1a9c9a7fcf7974a1a0307b2cb145bd (patch) | |
| tree | 16d611d9190bcf4939dd054909cb3a41a6d20fb7 /src/importer.cpp | |
| parent | 7aea21f2a30e0aa3bc75a579bd01ff9746470c05 (diff) | |
strops and memops refactor
Diffstat (limited to 'src/importer.cpp')
| -rw-r--r-- | src/importer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/importer.cpp b/src/importer.cpp index ae8bada..194913a 100644 --- a/src/importer.cpp +++ b/src/importer.cpp @@ -61,7 +61,7 @@ static int _ai_document_to_invoice_t(void *arg) { char* template_buffer = (char*)memops::alloc(query_buffer_len); memops::zero(template_buffer, query_buffer_len); - strncpy(template_buffer, file_template::peppol_invoice_template, query_buffer_len); + strops::copy(template_buffer, file_template::peppol_invoice_template, query_buffer_len); strops::replace(template_buffer, 50000, "{{INVOICE_LINE_LIST}}", file_template::peppol_invoice_line_template); char* ai_query = @@ -93,8 +93,8 @@ static int _ai_document_to_invoice_t(void *arg) { "cac:Delivery contains the delivery address for physical goods. This information might be under the section 'Shipping address', 'Shipped to' or something similar. If this is not explicitly set, leave this section empty.\n" ; - size_t query_len = strlen(template_buffer); - strncpy(template_buffer + query_len, ai_query, query_buffer_len - query_len); + size_t query_len = strops::length(template_buffer); + strops::copy(template_buffer + query_len, ai_query, query_buffer_len - query_len); request->status = importer::status::IMPORT_WAITING_FOR_RESPONSE; @@ -106,7 +106,7 @@ static int _ai_document_to_invoice_t(void *arg) { } invoice inv; - if (!administration_reader::read_invoice_from_xml(&inv, response, strlen(response))) { + if (!administration_reader::read_invoice_from_xml(&inv, response, strops::length(response))) { request->status = importer::status::IMPORT_DONE; request->error = I_ERR_FAILED_IMPORT; return 0; |
