diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-13 17:08:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-13 17:08:34 +0000 |
commit | 1ea84dc56d95ceaf85c036127c5045eba0ad50ee (patch) | |
tree | a8392d1877470f4d7513e3ad853fa843d564a544 /protocols/AimOscar/src/direct_connect.cpp | |
parent | 5c84f735bc4f40d3f2f645d003ef9a08576878d8 (diff) |
massive name conflict resolution
git-svn-id: http://svn.miranda-ng.org/main/trunk@14941 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar/src/direct_connect.cpp')
-rw-r--r-- | protocols/AimOscar/src/direct_connect.cpp | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/protocols/AimOscar/src/direct_connect.cpp b/protocols/AimOscar/src/direct_connect.cpp index 0ed07c535c..c4d026515d 100644 --- a/protocols/AimOscar/src/direct_connect.cpp +++ b/protocols/AimOscar/src/direct_connect.cpp @@ -16,24 +16,25 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include "stdafx.h"
void __cdecl CAimProto::aim_dc_helper(void* param) //only called when we are initiating a direct connection with someone else
{
- file_transfer *ft = (file_transfer*)param;
+ file_transfer *ft = (file_transfer*)param;
ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, ft, 0);
- NETLIBPACKETRECVER packetRecv = {0};
+ NETLIBPACKETRECVER packetRecv = { 0 };
packetRecv.cbSize = sizeof(packetRecv);
packetRecv.dwTimeout = 350000;
- HANDLE hServerPacketRecver = (HANDLE) CallService(MS_NETLIB_CREATEPACKETRECVER, (WPARAM)ft->hConn, 2048 * 4);
+ HANDLE hServerPacketRecver = (HANDLE)CallService(MS_NETLIB_CREATEPACKETRECVER, (WPARAM)ft->hConn, 2048 * 4);
int result;
if (ft->sending)//we are sending
result = sending_file(ft, hServerPacketRecver, packetRecv);
- else
+ else
result = receiving_file(ft, hServerPacketRecver, packetRecv);
Netlib_CloseHandle(hServerPacketRecver);
@@ -41,17 +42,12 @@ void __cdecl CAimProto::aim_dc_helper(void* param) //only called when we are ini ft->hConn = NULL;
if (result == 0)
- {
ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
- }
- else
- {
- if (!ft->requester && result == 1 && !Miranda_Terminated())
- {
+ else {
+ if (!ft->requester && result == 1 && !Miranda_Terminated()) {
ft->accepted = false;
HANDLE hConn = aim_peer_connect(AIM_PROXY_SERVER, get_default_port());
- if (hConn)
- {
+ if (hConn) {
debugLogA("Connected to proxy ip because we want to use a proxy for the file transfer.");
ft->requester = true;
ft->hConn = hConn;
@@ -59,30 +55,27 @@ void __cdecl CAimProto::aim_dc_helper(void* param) //only called when we are ini return;
}
}
- aim_file_ad(hServerConn, seqno, ft->sn, ft->icbm_cookie, true, 0);
+ aim_file_ad(m_hServerConn, m_seqno, ft->sn, ft->icbm_cookie, true, 0);
ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
}
- ft_list.remove_by_ft(ft);
+ m_ft_list.remove_by_ft(ft);
}
void aim_direct_connection_initiated(HANDLE hNewConnection, DWORD, void* extra)//for receiving stuff via dc
{
- CAimProto* ppro = (CAimProto*)extra;
- file_transfer *ft;
+ CAimProto *ppro = (CAimProto*)extra;
- NETLIBCONNINFO connInfo = { sizeof(connInfo) };
+ NETLIBCONNINFO connInfo = { sizeof(connInfo) };
CallService(MS_NETLIB_GETCONNECTIONINFO, (WPARAM)hNewConnection, (LPARAM)&connInfo);
ppro->debugLogA("Buddy connected: %s", connInfo.szIpPort);
// okay someone connected to us or we initiated the connection- we need to figure out who they are and if they belong
- ft = ppro->ft_list.find_by_port(connInfo.wPort);
- if (ft)
- {
+ file_transfer *ft = ppro->m_ft_list.find_by_port(connInfo.wPort);
+ if (ft) {
ft->hConn = hNewConnection;
ppro->aim_dc_helper(ft);
}
- else
- Netlib_CloseHandle(hNewConnection);
+ else Netlib_CloseHandle(hNewConnection);
}
|