X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/afb00c045e0ea58e39c0d7a7921bedbf26d1860d..9b8f74aec65e4e61ae82e14e6cb439da736ee808:/projects/sgconf_xml/main.cpp diff --git a/projects/sgconf_xml/main.cpp b/projects/sgconf_xml/main.cpp index 751a7537..03a63a9a 100644 --- a/projects/sgconf_xml/main.cpp +++ b/projects/sgconf_xml/main.cpp @@ -33,9 +33,9 @@ $Date: 2008/01/05 12:11:34 $ #include #include +#include "stg/common.h" +#include "stg/netunit.h" #include "request.h" -#include "common.h" -#include "netunit.h" #define FN_LEN (512) #define REQ_STR_LEN (300) @@ -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; }