* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
- * $Id: ratbox_lib.c 26092 2008-09-19 15:13:52Z androsyn $
+ * $Id: ratbox_lib.c 26282 2008-12-10 20:33:21Z androsyn $
*/
#include <libratbox_config.h>
#include <ratbox_lib.h>
#include <commio-int.h>
+#include <commio-ssl.h>
static log_cb *rb_log;
static restart_cb *rb_restart;
#else
tp = gmtime(&t);
#endif
- if(rb_unlikely(tp == NULL))
- {
- strcpy(buf, "");
- return (buf);
- }
-
if(buf == NULL)
{
p = timex;
tlen = len;
}
+ if(rb_unlikely(tp == NULL))
+ {
+ rb_strlcpy(p, "", tlen);
+ return (p);
+ }
+
rb_snprintf(p, tlen, "%s %s %d %02u:%02u:%02u %d",
s_weekdays[tp->tm_wday], s_month[tp->tm_mon],
tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec, tp->tm_year + 1900);
const char *
rb_lib_version(void)
{
- return libratbox_serno;
+ static char version_info[512];
+ char ssl_info[512];
+ rb_get_ssl_info(ssl_info, sizeof(ssl_info));
+ rb_snprintf(version_info, sizeof(version_info), "libratbox version: %s - %s", libratbox_serno, ssl_info);
+ return version_info;
}
void