Mercurial > pidgin.yaz
diff src/protocols/msn/msn.c @ 3720:34c95669952f
[gaim-migrate @ 3853]
WIN32 ifdef removals
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Wed, 16 Oct 2002 21:14:51 +0000 |
parents | da6e3c984985 |
children | a20bf3d247ff |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Wed Oct 16 20:02:57 2002 +0000 +++ b/src/protocols/msn/msn.c Wed Oct 16 21:14:51 2002 +0000 @@ -182,11 +182,7 @@ static int msn_write(int fd, void *data, int len) { debug_printf("MSN C: %s", data); -#ifndef _WIN32 return write(fd, data, len); -#else - return send(fd, data, len, 0); -#endif } static char *url_decode(const char *msg) @@ -460,11 +456,7 @@ if (ms->inpa) gaim_input_remove(ms->inpa); -#ifndef _WIN32 close(ms->fd); -#else - closesocket(ms->fd); -#endif g_free(ms->rxqueue); if (ms->msg) g_free(ms->msguser); @@ -706,11 +698,7 @@ /* This is really stupid and I hate to put this here. */ if (ms->fd != source) ms->fd = source; -#ifndef _WIN32 len = read(ms->fd, buf, sizeof(buf)); -#else - len = recv(ms->fd, buf, sizeof(buf), 0); -#endif if (len <= 0) { msn_kill_switch(ms); return; @@ -786,11 +774,7 @@ char buf[MSN_BUF_LEN]; if (source == -1 || !g_slist_find(connections, gc)) { -#ifndef _WIN32 close(source); -#else - closesocket(source); -#endif g_free(ms->sessid); g_free(ms->auth); g_free(ms); @@ -804,11 +788,7 @@ g_snprintf(buf, sizeof(buf), "ANS %d %s %s %s\r\n", ++ms->trId, gc->username, ms->auth, ms->sessid); if (msn_write(ms->fd, buf, strlen(buf)) < 0) { -#ifndef _WIN32 close(ms->fd); -#else - closesocket(ms->fd); -#endif g_free(ms->sessid); g_free(ms->auth); g_free(ms); @@ -826,11 +806,7 @@ char buf[MSN_BUF_LEN]; if (source == -1 || !g_slist_find(connections, gc)) { -#ifndef _WIN32 close(source); -#else - closesocket(source); -#endif if (g_slist_find(connections, gc)) { msn_kill_switch(ms); do_error_dialog(_("Gaim was unable to send an MSN message"), @@ -1362,11 +1338,7 @@ } ms->auth = g_strdup(tmp); } else { -#ifndef _WIN32 close(md->fd); -#else - closesocket(md->fd); -#endif gaim_input_remove(md->inpa); md->inpa = 0; md->fd = proxy_connect(host, port, msn_login_xfr_connect, gc); @@ -1453,11 +1425,7 @@ int cont = 1; int len; -#ifndef _WIN32 len = read(md->fd, buf, sizeof(buf)); -#else - len = recv(md->fd, buf, sizeof(buf), 0); -#endif if (len <= 0) { hide_login_progress_error(gc, _("Error reading from server")); signoff(gc); @@ -1533,11 +1501,7 @@ char buf[MSN_BUF_LEN]; if (!g_slist_find(connections, gc)) { -#ifndef _WIN32 close(source); -#else - closesocket(source); -#endif return; } @@ -1669,11 +1633,7 @@ } else port = 1863; -#ifndef _WIN32 close(md->fd); -#else - closesocket(md->fd); -#endif gaim_input_remove(md->inpa); md->inpa = 0; md->fd = 0; @@ -1704,11 +1664,7 @@ int cont = 1; int len; -#ifndef _WIN32 len = read(md->fd, buf, sizeof(buf)); -#else - len = recv(md->fd, buf, sizeof(buf), 0); -#endif if (len <= 0) { hide_login_progress(gc, _("Error reading from server")); signoff(gc); @@ -1762,11 +1718,7 @@ char buf[1024]; if (!g_slist_find(connections, gc)) { -#ifndef _WIN32 close(source); -#else - closesocket(source); -#endif return; } @@ -1813,11 +1765,7 @@ static void msn_close(struct gaim_connection *gc) { struct msn_data *md = gc->proto_data; -#ifndef _WIN32 close(md->fd); -#else - closesocket(md->fd); -#endif if (md->inpa) gaim_input_remove(md->inpa); g_free(md->rxqueue);