Mercurial > pidgin
changeset 1554:c3afde736a8a
[gaim-migrate @ 1564]
good stuff.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 10 Mar 2001 00:00:18 +0000 |
parents | bf10d0673d34 |
children | 5e54c7a2a394 |
files | plugins/yay/outgoing.c plugins/yay/rxhandlers.c plugins/yay/yay.c |
diffstat | 3 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/yay/outgoing.c Fri Mar 09 12:34:39 2001 +0000 +++ b/plugins/yay/outgoing.c Sat Mar 10 00:00:18 2001 +0000 @@ -30,7 +30,7 @@ if (!g_list_find(session->connlist, conn)) return 0; - if (write(conn->socket, buf, len) != len) { + if (send(conn->socket, buf, len, 0) != len) { int type = conn->type; yahoo_close(session, conn); YAHOO_PRINT(session, YAHOO_LOG_CRITICAL, "error sending");
--- a/plugins/yay/rxhandlers.c Fri Mar 09 12:34:39 2001 +0000 +++ b/plugins/yay/rxhandlers.c Sat Mar 10 00:00:18 2001 +0000 @@ -47,6 +47,7 @@ YAHOO_PRINT(session, YAHOO_LOG_DEBUG, session->cookie); if (!session->cookie) { yahoo_close(session, conn); + YAHOO_PRINT(session, YAHOO_LOG_ERROR, "did not get cookie"); CALLBACK(session, YAHOO_HANDLE_DISCONNECT); return 1; } @@ -225,7 +226,7 @@ error = errno; if (error) { yahoo_close(session, conn); - YAHOO_PRINT(session, YAHOO_LOG_ERROR, "unable to connect"); + YAHOO_PRINT(session, YAHOO_LOG_CRITICAL, "unable to connect"); CALLBACK(session, YAHOO_HANDLE_DISCONNECT); return; } @@ -259,12 +260,15 @@ if (pos == 1) { g_free(buf); yahoo_close(session, conn); + YAHOO_PRINT(session, YAHOO_LOG_CRITICAL, "could not read auth response"); CALLBACK(session, YAHOO_HANDLE_DISCONNECT); return; } YAHOO_PRINT(session, YAHOO_LOG_DEBUG, buf); - if (yahoo_parse_config(session, conn, buf)) + if (yahoo_parse_config(session, conn, buf)) { + YAHOO_PRINT(session, YAHOO_LOG_CRITICAL, "could not parse auth response"); CALLBACK(session, YAHOO_HANDLE_DISCONNECT); + } g_free(buf); } else if (conn->type == YAHOO_CONN_TYPE_MAIN) { struct yahoo_packet pkt; @@ -272,12 +276,14 @@ if ((read(socket, &pkt, 8) != 8) || strcmp(pkt.version, "YHOO1.0")) { yahoo_close(session, conn); + YAHOO_PRINT(session, YAHOO_LOG_CRITICAL, "invalid version type"); CALLBACK(session, YAHOO_HANDLE_DISCONNECT); return; } if (read(socket, &pkt.len, 4) != 4) { yahoo_close(session, conn); + YAHOO_PRINT(session, YAHOO_LOG_CRITICAL, "could not read length"); CALLBACK(session, YAHOO_HANDLE_DISCONNECT); return; } @@ -285,6 +291,7 @@ if (read(socket, &pkt.service, len - 12) != len - 12) { yahoo_close(session, conn); + YAHOO_PRINT(session, YAHOO_LOG_CRITICAL, "could not read data"); CALLBACK(session, YAHOO_HANDLE_DISCONNECT); return; }
--- a/plugins/yay/yay.c Fri Mar 09 12:34:39 2001 +0000 +++ b/plugins/yay/yay.c Sat Mar 10 00:00:18 2001 +0000 @@ -357,7 +357,7 @@ static void yahoo_send_im(struct gaim_connection *gc, char *who, char *message, int away) { struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; - if (away) return; + if (away || !strlen(message)) return; yahoo_send_message(yd->sess, yd->active_id, who, message); } @@ -414,6 +414,7 @@ yahoo_away(yd->sess, YAHOO_STATUS_AVAILABLE, NULL); yd->current_status = YAHOO_STATUS_AVAILABLE; } + gc->away = NULL; } } else if (gc->is_idle) { yahoo_away(yd->sess, YAHOO_STATUS_IDLE, NULL);