X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8bb00937bb7362edaec84d404ac4cb15f7704ddf..e158255de5b7513aec5b27bfadea978c0307fe9a:/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; }