]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp
Add creditExpire setting/getting via sgconf
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / rsconf.cpp
index 520aebf7cd1bfe81726b7c0896aea5e61a0bd4e4..a3957f361f6123c3cf53ca4a5739be4dfb17aea7 100644 (file)
 
 #include <cerrno>
 #include <csignal>
+#include <cstdio> // snprintf
 
 #include "configproto.h"
 #include "blowfish.h"
 
+#ifndef ENODATA
+// FreeBSD 4.* - suxx
+#define ENODATA -1
+#endif
+
 enum CONF_STATE
     {
     confHdr,
@@ -540,7 +546,7 @@ void CONFIGPROTO::SendError(const char * text)
 {
 char s[255];
 answerList.clear();
-sprintf(s, "<Error value=\"%s\"/>", text);
+snprintf(s, 255, "<Error value=\"%s\"/>", text);
 answerList.push_back(s);
 }
 //-----------------------------------------------------------------------------