aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorjames <>2008-03-11 17:47:24 +0000
committerjames <>2008-03-11 17:47:24 +0000
commit7a28b8904a1d92528c92eb5c4fe7ce8f217b3393 (patch)
tree55fe2e6d6ded7bc516bf04b76a8ac4588b6beec1 /apps
parent2970fb6cc7f7645c40e01fea50408aeea1de532b (diff)
downloadsympathy-7a28b8904a1d92528c92eb5c4fe7ce8f217b3393.tar.gz
sympathy-7a28b8904a1d92528c92eb5c4fe7ce8f217b3393.tar.bz2
sympathy-7a28b8904a1d92528c92eb5c4fe7ce8f217b3393.zip
*** empty log message ***
Diffstat (limited to 'apps')
-rw-r--r--apps/clients.c13
-rw-r--r--apps/clients.h7
-rw-r--r--apps/mainloop.c5
3 files changed, 18 insertions, 7 deletions
diff --git a/apps/clients.c b/apps/clients.c
index d040431..6175492 100644
--- a/apps/clients.c
+++ b/apps/clients.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.23 2008/03/11 17:47:24 james
+ * *** empty log message ***
+ *
* Revision 1.22 2008/03/07 14:16:44 james
* *** empty log message ***
*
@@ -177,6 +180,7 @@ clients_new_client (Clients * cs, Socket * s, Context * ctx)
fprintf (stderr, "Client at %p created\n", c);
#endif
+ log_f(ctx->l,"<client %p connected - now %d clients>",c,cs->n);
if (ipc_msg_send_debug (s, "new_client"))
c->dead++;
@@ -185,7 +189,7 @@ clients_new_client (Clients * cs, Socket * s, Context * ctx)
}
void
-clients_reap (Clients * cs)
+clients_reap (Clients * cs,Context *ctx)
{
Client **p, *c;
@@ -197,6 +201,7 @@ clients_reap (Clients * cs)
*p = c->next;
client_free (c);
cs->n--;
+ log_f(ctx->l,"<client %p disconnected - now %d clients>",c,cs->n);
} else {
p = &(c->next);
}
@@ -247,12 +252,12 @@ clients_post_select (Clients * cs, Context * ctx, fd_set * rfds,
}
if (deaded)
- clients_reap (cs);
+ clients_reap (cs,ctx);
}
void
-clients_shutdown (Clients * cs)
+clients_shutdown (Clients * cs,Context *ctx)
{
Client *c;
@@ -261,7 +266,7 @@ clients_shutdown (Clients * cs)
}
- clients_reap (cs);
+ clients_reap (cs,ctx);
}
diff --git a/apps/clients.h b/apps/clients.h
index b2e669a..5c8b419 100644
--- a/apps/clients.h
+++ b/apps/clients.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.10 2008/03/11 17:47:24 james
+ * *** empty log message ***
+ *
* Revision 1.9 2008/03/10 11:49:32 james
* *** empty log message ***
*
@@ -60,12 +63,12 @@ typedef struct {
/* clients.c */
extern void client_free (Client * c);
extern Client *clients_new_client (Clients * cs, Socket * s, Context * ctx);
-extern void clients_reap (Clients * cs);
+extern void clients_reap (Clients * cs,Context *ctx);
extern Clients *clients_new (void);
extern void clients_pre_select (Clients * cs, fd_set * rfds, fd_set * wfds);
extern void clients_post_select (Clients * cs, Context * ctx, fd_set * rfds,
fd_set * wfds);
-extern void clients_shutdown (Clients * cs);
+extern void clients_shutdown (Clients * cs,Context *ctx);
extern int send_output (Clients * cs, void *buf, int len);
extern int send_status (Clients * cs, char *msg);
diff --git a/apps/mainloop.c b/apps/mainloop.c
index 74e456e..4cc65a0 100644
--- a/apps/mainloop.c
+++ b/apps/mainloop.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.30 2008/03/11 17:47:24 james
+ * *** empty log message ***
+ *
* Revision 1.29 2008/03/10 11:49:32 james
* *** empty log message ***
*
@@ -557,5 +560,5 @@ mainloop (Context * c, ANSI * ansi, Socket * server_socket,
}
if (clients)
- clients_shutdown (clients);
+ clients_shutdown (clients,c);
}