comparison src/protocols/msn/session.c @ 7288:ff9127038a5a

[gaim-migrate @ 7869] It doesn't completely work yet, but this is the beginnings of the MSN HTTP port 80 connect method. I don't have it set so it can be enabled, so it's harmless to commit this now, but I want a second set of eyes, and I also want to do other MSN work without dealing with hand-merging patches. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 17 Oct 2003 14:57:59 +0000
parents 1cfbb731aa1f
children 3a48ade4f510
comparison
equal deleted inserted replaced
7287:3a41c3f80228 7288:ff9127038a5a
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 21 */
22 #include "msn.h" 22 #include "msn.h"
23 #include "session.h" 23 #include "session.h"
24 #include "dispatch.h" 24 #include "dispatch.h"
25 #include "notification.h"
25 26
26 MsnSession * 27 MsnSession *
27 msn_session_new(GaimAccount *account, const char *server, int port) 28 msn_session_new(GaimAccount *account, const char *server, int port)
28 { 29 {
29 MsnSession *session; 30 MsnSession *session;
101 g_return_val_if_fail(session != NULL, FALSE); 102 g_return_val_if_fail(session != NULL, FALSE);
102 g_return_val_if_fail(!session->connected, TRUE); 103 g_return_val_if_fail(!session->connected, TRUE);
103 104
104 session->connected = TRUE; 105 session->connected = TRUE;
105 106
106 session->dispatch_conn = msn_dispatch_new(session, 107 if (session->http_method)
107 session->dispatch_server, 108 {
108 session->dispatch_port); 109 session->notification_conn =
109 110 msn_notification_new(session, "gateway.messenger.hotmail.com", 80);
110 if (msn_servconn_connect(session->dispatch_conn)) 111
111 return TRUE; 112 if (msn_servconn_connect(session->notification_conn))
113 return TRUE;
114 }
115 else
116 {
117 session->dispatch_conn = msn_dispatch_new(session,
118 session->dispatch_server,
119 session->dispatch_port);
120
121 if (msn_servconn_connect(session->dispatch_conn))
122 return TRUE;
123 }
112 124
113 return FALSE; 125 return FALSE;
114 } 126 }
115 127
116 void 128 void