comparison plugins/icq/proxy.c @ 1977:7b3f1eb1ef7d

[gaim-migrate @ 1987] updated icqlib. fixed import dialog (watch debug window for errors). adam's (not mid's) patch for oscar. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 09 Jun 2001 14:46:51 +0000
parents 8ed70631ed15
children
comparison
equal deleted inserted replaced
1976:24aed1c31342 1977:7b3f1eb1ef7d
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 2
3 /* 3 /*
4 * $Id: proxy.c 1987 2001-06-09 14:46:51Z warmenhoven $
5 *
4 * Copyright (C) 1998-2001, Denis V. Dmitrienko <denis@null.net> and 6 * Copyright (C) 1998-2001, Denis V. Dmitrienko <denis@null.net> and
5 * Bill Soudan <soudan@kde.org> 7 * Bill Soudan <soudan@kde.org>
6 * 8 *
7 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
55 free(icqlink->icq_ProxyHost); 57 free(icqlink->icq_ProxyHost);
56 if(icqlink->icq_ProxyName) 58 if(icqlink->icq_ProxyName)
57 free(icqlink->icq_ProxyName); 59 free(icqlink->icq_ProxyName);
58 if(icqlink->icq_ProxyPass) 60 if(icqlink->icq_ProxyPass)
59 free(icqlink->icq_ProxyPass); 61 free(icqlink->icq_ProxyPass);
62
63 if(!phost)
64 {
65 icq_FmtLog(icqlink, ICQ_LOG_ERROR, "[SOCKS] Proxy host is empty\n");
66 icqlink->icq_UseProxy = 0;
67 return;
68 }
69 if(!pname)
70 {
71 icq_FmtLog(icqlink, ICQ_LOG_ERROR, "[SOCKS] User name is empty\n");
72 icqlink->icq_UseProxy = 0;
73 return;
74 }
75 if(!pname)
76 {
77 icq_FmtLog(icqlink, ICQ_LOG_ERROR, "[SOCKS] User password is empty\n");
78 icqlink->icq_UseProxy = 0;
79 return;
80 }
81
60 if(strlen(pname)>255) 82 if(strlen(pname)>255)
61 { 83 {
62 icq_FmtLog(icqlink, ICQ_LOG_ERROR, "[SOCKS] User name greater than 255 chars\n"); 84 icq_FmtLog(icqlink, ICQ_LOG_ERROR, "[SOCKS] User name greater than 255 chars\n");
63 icqlink->icq_UseProxy = 0; 85 icqlink->icq_UseProxy = 0;
64 return; 86 return;
67 { 89 {
68 icq_FmtLog(icqlink, ICQ_LOG_ERROR, "[SOCKS] User password greater than 255 chars\n"); 90 icq_FmtLog(icqlink, ICQ_LOG_ERROR, "[SOCKS] User password greater than 255 chars\n");
69 icqlink->icq_UseProxy = 0; 91 icqlink->icq_UseProxy = 0;
70 return; 92 return;
71 } 93 }
94
72 icqlink->icq_UseProxy = 1; 95 icqlink->icq_UseProxy = 1;
73 icqlink->icq_ProxyHost = strdup(phost); 96 icqlink->icq_ProxyHost = strdup(phost);
74 icqlink->icq_ProxyPort = pport; 97 icqlink->icq_ProxyPort = pport;
75 icqlink->icq_ProxyAuth = pauth; 98 icqlink->icq_ProxyAuth = pauth;
76 icqlink->icq_ProxyName = strdup(pname); 99 icqlink->icq_ProxyName = strdup(pname);