X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/afb00c045e0ea58e39c0d7a7921bedbf26d1860d..cbdfaa37185dc0f267e60e6577f89df5c9316592:/projects/sgconf_xml/main.cpp diff --git a/projects/sgconf_xml/main.cpp b/projects/sgconf_xml/main.cpp index 751a7537..7f2ed761 100644 --- a/projects/sgconf_xml/main.cpp +++ b/projects/sgconf_xml/main.cpp @@ -135,7 +135,6 @@ if (!req->strReq.res_empty()) //----------------------------------------------------------------------------- int Process(REQUEST * r) { -char errorMsg[MAX_ERR_STR_LEN]; int ret; char str[2048]; @@ -150,20 +149,17 @@ CreateRequest(r, str); if ((ret = nt.Connect()) != st_ok) { - strncpy(errorMsg, nt.GetError(), MAX_ERR_STR_LEN); - printf("%s", errorMsg); + printf("%s\n", nt.GetError().c_str()); return ret; } if ((ret = nt.Transact(str)) != st_ok) { - strncpy(errorMsg, nt.GetError(), MAX_ERR_STR_LEN); - printf("%s", errorMsg); + printf("%s\n", nt.GetError().c_str()); return ret; } if ((ret = nt.Disconnect()) != st_ok) { - strncpy(errorMsg, nt.GetError(), MAX_ERR_STR_LEN); - printf("%s", errorMsg); + printf("%s\n", nt.GetError().c_str()); return ret; }