#include "includes.h"
#include "smbprofile.h"
+#include "lib/util/time_basic.h"
#include "conn_tdb.h"
#include "status_json.h"
#include "../libcli/security/security.h"
{
struct json_object sub_json;
struct json_object connections_json;
+ struct timeval tv;
+ struct timeval_buf tv_buf;
+ char *time = NULL;
int result = 0;
char *sess_id_str = NULL;
char *tcon_id_str = NULL;
if (result < 0) {
goto failure;
}
+ nttime_to_timeval(&tv, crec->start);
+ time = timeval_str_buf(&tv, true, true, &tv_buf);
+ if (time == NULL) {
+ goto failure;
+ }
+ result = json_add_string(&sub_json, "connected_at", time);
+ if (result < 0) {
+ goto failure;
+ }
result = json_add_object(&connections_json, tcon_id_str, &sub_json);
if (result < 0) {