Mercurial > pidgin
diff src/protocols/msn/msn.c @ 2210:3a6fd1e8f00a
[gaim-migrate @ 2220]
i haven't even tested this.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 05 Sep 2001 05:25:13 +0000 |
parents | c24595d3c364 |
children | a226ebf4be47 |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Tue Sep 04 18:42:44 2001 +0000 +++ b/src/protocols/msn/msn.c Wed Sep 05 05:25:13 2001 +0000 @@ -497,6 +497,7 @@ char buf[MSN_BUF_LEN]; if (source == -1 || !g_slist_find(connections, gc)) { + close(source); g_free(ms->sessid); g_free(ms->auth); g_free(ms); @@ -528,6 +529,7 @@ char buf[MSN_BUF_LEN]; if (source == -1 || !g_slist_find(connections, gc)) { + close(source); g_free(ms->auth); g_free(ms); return; @@ -900,8 +902,10 @@ struct msn_data *md; char buf[MSN_BUF_LEN]; - if (!g_slist_find(connections, gc)) + if (!g_slist_find(connections, gc)) { + close(source); return; + } md = gc->proto_data; @@ -975,8 +979,21 @@ set_login_progress(gc, 3, "Requesting to send password"); } else if (!g_strncasecmp(buf, "USR", 3)) { + char *resp, *friend, *tmp = buf; + + GET_NEXT(tmp); + GET_NEXT(tmp); + resp = tmp; + GET_NEXT(tmp); + GET_NEXT(tmp); + friend = tmp; + + debug_printf("resp: %s; friend: %s\n", resp, friend); + /* so here, we're either getting the challenge or the OK */ if (strstr(buf, "OK")) { + g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", friend); + g_snprintf(buf, sizeof(buf), "SYN %d 0\n", ++md->trId); if (msn_write(md->fd, buf, strlen(buf)) < 0) { hide_login_progress(gc, "Unable to write"); @@ -1082,8 +1099,10 @@ struct msn_data *md; char buf[1024]; - if (!g_slist_find(connections, gc)) + if (!g_slist_find(connections, gc)) { + close(source); return; + } md = gc->proto_data;