Skip to content

Commit

Permalink
Only list sockets in session list
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Jun 30, 2014
1 parent b8b7617 commit 7b95d5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion abduco.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ static int list_session() {
puts("Active sessions");
while (n--) {
struct stat sb; char buf[255];
if (stat(namelist[n]->d_name, &sb) == 0) {
if (stat(namelist[n]->d_name, &sb) == 0 && S_ISSOCK(sb.st_mode)) {
strftime(buf, sizeof(buf), "%a%t %F %T", localtime(&sb.st_atime));
char status = ' ';
if (sb.st_mode & S_IXUSR)
Expand Down

0 comments on commit 7b95d5b

Please sign in to comment.