summaryrefslogtreecommitdiff
path: root/src/importer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/importer.cpp')
-rw-r--r--src/importer.cpp8
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;