diff options
author | james <> | 2008-03-06 21:33:02 +0000 |
---|---|---|
committer | james <> | 2008-03-06 21:33:02 +0000 |
commit | 63a3f74532632a7e07b71f805eb806b05b3f19e3 (patch) | |
tree | 07e9b206c5f8d30e11e6780658ddedfc25e32c77 /apps | |
parent | 9d7972be8f555a5ece9a8e7b1b6275a9d7c0b212 (diff) | |
download | sympathy-63a3f74532632a7e07b71f805eb806b05b3f19e3.tar.gz sympathy-63a3f74532632a7e07b71f805eb806b05b3f19e3.tar.bz2 sympathy-63a3f74532632a7e07b71f805eb806b05b3f19e3.zip |
*** empty log message ***
Diffstat (limited to 'apps')
-rw-r--r-- | apps/mainloop.c | 13 | ||||
-rw-r--r-- | apps/sympathy.c | 19 |
2 files changed, 24 insertions, 8 deletions
diff --git a/apps/mainloop.c b/apps/mainloop.c index e266179..19c5759 100644 --- a/apps/mainloop.c +++ b/apps/mainloop.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.25 2008/03/06 21:33:02 james + * *** empty log message *** + * * Revision 1.24 2008/03/06 16:49:39 james * *** empty log message *** * @@ -548,16 +551,18 @@ mainloop (Context * c, ANSI * ansi, Socket * server_socket, /*any data from the server */ if (client_socket) { + int err=0; + if (socket_post_select (client_socket, &rfds, &wfds)) break; - while (client_socket->msg) + while (client_socket->msg && !err) { - if (msg_from_server (ansi, client_socket->msg, c)) - break; - + err+=msg_from_server (ansi, client_socket->msg, c); socket_consume_msg (client_socket); } + + if (err) break; } diff --git a/apps/sympathy.c b/apps/sympathy.c index 33c47e7..2a9b314 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.35 2008/03/06 21:33:02 james + * *** empty log message *** + * * Revision 1.34 2008/03/06 16:49:39 james * *** empty log message *** * @@ -274,8 +277,9 @@ mome (char *fmt, ...) } + Socket * -find_socket (char *fmt, ...) +find_socket (char **retpath,char *fmt, ...) { Socket *ret; char *path, *leaf, *h, **ptr; @@ -315,13 +319,18 @@ find_socket (char *fmt, ...) ret = socket_connect (path); - free (path); if (ret) { + if (retpath) { + *retpath=path; + } else { + free (path); + } free (leaf); return ret; } + free (path); } @@ -786,11 +795,11 @@ main (int argc, char *argv[]) if (safe_atoi (id) > 0) { - client_socket = find_socket ("%s%d", hostname, safe_atoi (id)); + client_socket = find_socket (&oargs['k'],"%s%d", hostname, safe_atoi (id)); } else { - client_socket = find_socket ("%s", id); + client_socket = find_socket (&oargs['k'],"%s", id); } if (!client_socket) @@ -825,6 +834,8 @@ main (int argc, char *argv[]) ansi_new_from_terminal (terminal_open (0, 1), oflags['u'] ? 0 : 1); ansi->reset (ansi, NULL); + if (ansi->set_title) + ansi->set_title(ansi,oargs['k']); } if (oflags['I']) { |