mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 10:08:47 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
4b703d3049
10
session.c
10
session.c
@ -130,10 +130,6 @@ session_create(const char *name, int argc, char **argv, const char *path,
|
|||||||
memcpy(s->tio, tio, sizeof *s->tio);
|
memcpy(s->tio, tio, sizeof *s->tio);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gettimeofday(&s->creation_time, NULL) != 0)
|
|
||||||
fatal("gettimeofday failed");
|
|
||||||
session_update_activity(s, &s->creation_time);
|
|
||||||
|
|
||||||
s->sx = sx;
|
s->sx = sx;
|
||||||
s->sy = sy;
|
s->sy = sy;
|
||||||
|
|
||||||
@ -150,6 +146,8 @@ session_create(const char *name, int argc, char **argv, const char *path,
|
|||||||
}
|
}
|
||||||
RB_INSERT(sessions, &sessions, s);
|
RB_INSERT(sessions, &sessions, s);
|
||||||
|
|
||||||
|
log_debug("new session %s $%u", s->name, s->id);
|
||||||
|
|
||||||
if (gettimeofday(&s->creation_time, NULL) != 0)
|
if (gettimeofday(&s->creation_time, NULL) != 0)
|
||||||
fatal("gettimeofday failed");
|
fatal("gettimeofday failed");
|
||||||
session_update_activity(s, &s->creation_time);
|
session_update_activity(s, &s->creation_time);
|
||||||
@ -264,6 +262,10 @@ session_update_activity(struct session *s, struct timeval *from)
|
|||||||
else
|
else
|
||||||
memcpy(&s->activity_time, from, sizeof s->activity_time);
|
memcpy(&s->activity_time, from, sizeof s->activity_time);
|
||||||
|
|
||||||
|
log_debug("session %s activity %lld.%06d (last %lld.%06d)", s->name,
|
||||||
|
(long long)s->activity_time.tv_sec, (int)s->activity_time.tv_usec,
|
||||||
|
(long long)last->tv_sec, (int)last->tv_usec);
|
||||||
|
|
||||||
if (evtimer_initialized(&s->lock_timer))
|
if (evtimer_initialized(&s->lock_timer))
|
||||||
evtimer_del(&s->lock_timer);
|
evtimer_del(&s->lock_timer);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user