2012-08-14 23:12:44 +04:00
|
|
|
/**
|
2012-10-09 06:31:40 +04:00
|
|
|
* FreeRDP: A Remote Desktop Protocol Client
|
|
|
|
* FreeRDP Windows Server
|
|
|
|
*
|
|
|
|
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
* Copyright 2012 Corey Clayton <can.of.tuna@gmail.com>
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2012-08-23 23:36:34 +04:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2012-08-15 00:49:24 +04:00
|
|
|
#include <winpr/tchar.h>
|
|
|
|
#include <winpr/windows.h>
|
2012-08-23 23:36:34 +04:00
|
|
|
|
2012-08-14 23:12:44 +04:00
|
|
|
#include <freerdp/listener.h>
|
2012-08-16 02:01:06 +04:00
|
|
|
#include <freerdp/codec/rfx.h>
|
|
|
|
#include <freerdp/utils/stream.h>
|
2012-08-14 23:12:44 +04:00
|
|
|
|
2012-09-16 06:19:26 +04:00
|
|
|
#include "wf_info.h"
|
2012-09-03 07:36:01 +04:00
|
|
|
#include "wf_input.h"
|
2012-08-14 23:12:44 +04:00
|
|
|
#include "wf_mirage.h"
|
2012-09-06 04:03:07 +04:00
|
|
|
#include "wf_update.h"
|
2012-09-16 04:29:33 +04:00
|
|
|
#include "wf_settings.h"
|
2012-10-11 05:42:18 +04:00
|
|
|
#include "wf_rdpsnd.h"
|
2012-08-14 23:12:44 +04:00
|
|
|
|
|
|
|
#include "wf_peer.h"
|
|
|
|
|
|
|
|
void wf_peer_context_new(freerdp_peer* client, wfPeerContext* context)
|
|
|
|
{
|
2012-09-03 01:09:36 +04:00
|
|
|
context->info = wf_info_get_instance();
|
2012-10-11 05:42:18 +04:00
|
|
|
context->vcm = WTSCreateVirtualChannelManager(client);
|
2012-09-06 04:03:07 +04:00
|
|
|
wf_info_peer_register(context->info, context);
|
2012-08-14 23:12:44 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void wf_peer_context_free(freerdp_peer* client, wfPeerContext* context)
|
2012-08-23 23:36:34 +04:00
|
|
|
{
|
2012-09-06 04:03:07 +04:00
|
|
|
wf_info_peer_unregister(context->info, context);
|
2012-10-11 05:42:18 +04:00
|
|
|
|
|
|
|
if (context->rdpsnd)
|
2012-10-13 05:02:42 +04:00
|
|
|
{
|
|
|
|
wf_rdpsnd_lock();
|
|
|
|
context->info->snd_stop = TRUE;
|
2012-10-11 05:42:18 +04:00
|
|
|
rdpsnd_server_context_free(context->rdpsnd);
|
2012-10-13 05:02:42 +04:00
|
|
|
wf_rdpsnd_unlock();
|
|
|
|
}
|
2012-10-11 05:42:18 +04:00
|
|
|
|
|
|
|
WTSDestroyVirtualChannelManager(context->vcm);
|
2012-08-15 00:49:24 +04:00
|
|
|
}
|
|
|
|
|
2012-08-14 23:12:44 +04:00
|
|
|
void wf_peer_init(freerdp_peer* client)
|
|
|
|
{
|
|
|
|
client->context_size = sizeof(wfPeerContext);
|
|
|
|
client->ContextNew = (psPeerContextNew) wf_peer_context_new;
|
|
|
|
client->ContextFree = (psPeerContextFree) wf_peer_context_free;
|
2012-10-09 06:31:40 +04:00
|
|
|
|
2012-08-14 23:12:44 +04:00
|
|
|
freerdp_peer_context_new(client);
|
|
|
|
}
|
2012-09-17 01:38:33 +04:00
|
|
|
|
2012-10-09 10:38:39 +04:00
|
|
|
BOOL wf_peer_post_connect(freerdp_peer* client)
|
2012-08-15 00:49:24 +04:00
|
|
|
{
|
2012-10-11 05:42:18 +04:00
|
|
|
int i;
|
2012-09-03 01:09:36 +04:00
|
|
|
wfInfo* wfi;
|
2012-09-07 08:01:16 +04:00
|
|
|
rdpSettings* settings;
|
2012-08-14 23:12:44 +04:00
|
|
|
wfPeerContext* context = (wfPeerContext*) client->context;
|
2012-08-15 23:27:03 +04:00
|
|
|
|
2012-09-03 01:09:36 +04:00
|
|
|
wfi = context->info;
|
2012-09-07 08:01:16 +04:00
|
|
|
settings = client->settings;
|
2012-08-15 23:27:03 +04:00
|
|
|
|
2013-03-13 01:03:13 +04:00
|
|
|
if ( (get_screen_info(wfi->screenID, NULL, &wfi->servscreen_width, &wfi->servscreen_height, &wfi->bitsPerPixel) == 0) ||
|
2012-11-01 01:24:14 +04:00
|
|
|
(wfi->servscreen_width == 0) ||
|
|
|
|
(wfi->servscreen_height == 0) ||
|
2012-10-24 04:43:39 +04:00
|
|
|
(wfi->bitsPerPixel == 0) )
|
2012-10-24 04:32:29 +04:00
|
|
|
{
|
|
|
|
_tprintf(_T("postconnect: error getting screen info for screen %d\n"), wfi->screenID);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2012-08-15 23:27:03 +04:00
|
|
|
|
2012-11-17 07:54:31 +04:00
|
|
|
if ((settings->DesktopWidth != wfi->servscreen_width) || (settings->DesktopHeight != wfi->servscreen_height))
|
2012-08-14 23:12:44 +04:00
|
|
|
{
|
2013-03-13 01:03:13 +04:00
|
|
|
/*
|
2012-09-07 08:01:16 +04:00
|
|
|
printf("Client requested resolution %dx%d, but will resize to %dx%d\n",
|
2012-11-17 07:54:31 +04:00
|
|
|
settings->DesktopWidth, settings->DesktopHeight, wfi->servscreen_width, wfi->servscreen_height);
|
2013-03-13 01:03:13 +04:00
|
|
|
*/
|
2012-08-15 23:27:03 +04:00
|
|
|
|
2012-11-17 07:54:31 +04:00
|
|
|
settings->DesktopWidth = wfi->servscreen_width;
|
|
|
|
settings->DesktopHeight = wfi->servscreen_height;
|
|
|
|
settings->ColorDepth = wfi->bitsPerPixel;
|
2012-08-24 00:35:54 +04:00
|
|
|
|
2012-09-07 08:01:16 +04:00
|
|
|
client->update->DesktopResize(client->update->context);
|
2012-08-14 23:12:44 +04:00
|
|
|
}
|
2012-08-24 00:35:54 +04:00
|
|
|
|
2012-11-08 08:29:24 +04:00
|
|
|
for (i = 0; i < client->settings->ChannelCount; i++)
|
2012-10-11 05:42:18 +04:00
|
|
|
{
|
2012-11-08 08:29:24 +04:00
|
|
|
if (client->settings->ChannelDefArray[i].joined)
|
2012-10-11 05:42:18 +04:00
|
|
|
{
|
2012-11-08 08:29:24 +04:00
|
|
|
if (strncmp(client->settings->ChannelDefArray[i].Name, "rdpsnd", 6) == 0)
|
2012-10-11 05:42:18 +04:00
|
|
|
{
|
|
|
|
wf_peer_rdpsnd_init(context); /* Audio Output */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-10-09 10:31:28 +04:00
|
|
|
return TRUE;
|
2012-08-14 23:12:44 +04:00
|
|
|
}
|
|
|
|
|
2012-10-09 10:38:39 +04:00
|
|
|
BOOL wf_peer_activate(freerdp_peer* client)
|
2012-09-17 01:38:33 +04:00
|
|
|
{
|
|
|
|
wfInfo* wfi;
|
2012-09-17 05:05:51 +04:00
|
|
|
wfPeerContext* context = (wfPeerContext*) client->context;
|
2012-10-09 06:31:40 +04:00
|
|
|
|
2012-09-17 05:05:51 +04:00
|
|
|
wfi = context->info;
|
2012-10-09 10:31:28 +04:00
|
|
|
client->activated = TRUE;
|
2012-09-17 05:05:51 +04:00
|
|
|
wf_update_peer_activate(wfi, context);
|
2012-09-17 01:38:33 +04:00
|
|
|
|
2012-10-09 06:31:40 +04:00
|
|
|
wfreerdp_server_peer_callback_event(((rdpContext*) context)->peer->pId, WF_SRV_CALLBACK_EVENT_ACTIVATE);
|
|
|
|
|
2012-10-09 10:31:28 +04:00
|
|
|
return TRUE;
|
2012-09-16 23:30:11 +04:00
|
|
|
}
|
2012-09-17 01:38:33 +04:00
|
|
|
|
2012-10-09 10:38:39 +04:00
|
|
|
BOOL wf_peer_logon(freerdp_peer* client, SEC_WINNT_AUTH_IDENTITY* identity, BOOL automatic)
|
2012-09-16 23:30:11 +04:00
|
|
|
{
|
2013-03-13 01:03:13 +04:00
|
|
|
/*
|
2012-09-16 23:30:11 +04:00
|
|
|
if (automatic)
|
2012-09-18 01:05:42 +04:00
|
|
|
{
|
2012-09-16 23:30:11 +04:00
|
|
|
_tprintf(_T("Logon: User:%s Domain:%s Password:%s\n"),
|
|
|
|
identity->User, identity->Domain, identity->Password);
|
2012-09-18 01:05:42 +04:00
|
|
|
}
|
2013-03-13 01:03:13 +04:00
|
|
|
*/
|
2012-10-09 06:31:40 +04:00
|
|
|
|
|
|
|
wfreerdp_server_peer_callback_event(((rdpContext*) client->context)->peer->pId, WF_SRV_CALLBACK_EVENT_AUTH);
|
2012-10-09 10:31:28 +04:00
|
|
|
return TRUE;
|
2012-09-17 01:38:33 +04:00
|
|
|
}
|
|
|
|
|
2012-10-09 11:26:39 +04:00
|
|
|
void wf_peer_synchronize_event(rdpInput* input, UINT32 flags)
|
2012-08-18 00:24:56 +04:00
|
|
|
{
|
|
|
|
|
2012-08-16 02:01:06 +04:00
|
|
|
}
|
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
void wf_peer_accepted(freerdp_listener* instance, freerdp_peer* client)
|
2012-08-14 23:12:44 +04:00
|
|
|
{
|
2012-09-16 04:29:33 +04:00
|
|
|
CreateThread(NULL, 0, wf_peer_main_loop, client, 0, NULL);
|
|
|
|
}
|
2012-09-03 01:09:36 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
DWORD WINAPI wf_peer_socket_listener(LPVOID lpParam)
|
|
|
|
{
|
|
|
|
int i, fds;
|
|
|
|
int rcount;
|
|
|
|
int max_fds;
|
|
|
|
void* rfds[32];
|
|
|
|
fd_set rfds_set;
|
|
|
|
wfPeerContext* context;
|
|
|
|
freerdp_peer* client = (freerdp_peer*) lpParam;
|
2012-09-04 02:38:51 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
ZeroMemory(rfds, sizeof(rfds));
|
|
|
|
context = (wfPeerContext*) client->context;
|
2012-09-17 02:37:14 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
while (1)
|
2012-09-17 02:37:14 +04:00
|
|
|
{
|
2012-09-16 04:29:33 +04:00
|
|
|
rcount = 0;
|
|
|
|
|
2012-10-09 10:31:28 +04:00
|
|
|
if (client->GetFileDescriptor(client, rfds, &rcount) != TRUE)
|
2012-09-17 02:37:14 +04:00
|
|
|
{
|
2013-03-13 01:03:13 +04:00
|
|
|
//printf("Failed to get peer file descriptor\n");
|
2012-09-16 04:29:33 +04:00
|
|
|
break;
|
2012-09-02 22:39:27 +04:00
|
|
|
}
|
2012-09-17 02:37:14 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
max_fds = 0;
|
|
|
|
FD_ZERO(&rfds_set);
|
2012-08-14 23:12:44 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
for (i = 0; i < rcount; i++)
|
|
|
|
{
|
|
|
|
fds = (int)(long)(rfds[i]);
|
2012-09-03 01:09:36 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
if (fds > max_fds)
|
|
|
|
max_fds = fds;
|
2012-08-14 23:12:44 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
FD_SET(fds, &rfds_set);
|
|
|
|
}
|
2012-10-09 06:31:40 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
if (max_fds == 0)
|
|
|
|
break;
|
2012-10-09 06:31:40 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
select(max_fds + 1, &rfds_set, NULL, NULL, NULL);
|
2012-08-14 23:12:44 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
SetEvent(context->socketEvent);
|
|
|
|
WaitForSingleObject(context->socketSemaphore, INFINITE);
|
2012-08-14 23:12:44 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
if (context->socketClose)
|
|
|
|
break;
|
2012-08-14 23:12:44 +04:00
|
|
|
}
|
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
return 0;
|
|
|
|
}
|
2012-08-20 22:36:59 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
void wf_peer_read_settings(freerdp_peer* client)
|
|
|
|
{
|
2012-11-08 00:13:14 +04:00
|
|
|
if (!wf_settings_read_string_ascii(HKEY_LOCAL_MACHINE, _T("Software\\FreeRDP\\Server"), _T("CertificateFile"), &(client->settings->CertificateFile)))
|
|
|
|
client->settings->CertificateFile = _strdup("server.crt");
|
2012-08-20 22:36:59 +04:00
|
|
|
|
2012-11-08 00:13:14 +04:00
|
|
|
if (!wf_settings_read_string_ascii(HKEY_LOCAL_MACHINE, _T("Software\\FreeRDP\\Server"), _T("PrivateKeyFile"), &(client->settings->PrivateKeyFile)))
|
|
|
|
client->settings->PrivateKeyFile = _strdup("server.key");
|
2012-08-14 23:12:44 +04:00
|
|
|
}
|
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
DWORD WINAPI wf_peer_main_loop(LPVOID lpParam)
|
2012-08-14 23:12:44 +04:00
|
|
|
{
|
2012-09-16 04:29:33 +04:00
|
|
|
wfInfo* wfi;
|
|
|
|
DWORD nCount;
|
|
|
|
DWORD status;
|
|
|
|
HANDLE handles[32];
|
|
|
|
rdpSettings* settings;
|
|
|
|
wfPeerContext* context;
|
|
|
|
freerdp_peer* client = (freerdp_peer*) lpParam;
|
2012-08-14 23:12:44 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
wf_peer_init(client);
|
2012-08-14 23:12:44 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
settings = client->settings;
|
2012-11-08 00:13:14 +04:00
|
|
|
settings->RemoteFxCodec = TRUE;
|
2013-01-28 02:17:04 +04:00
|
|
|
settings->ColorDepth = 32;
|
2012-11-08 00:13:14 +04:00
|
|
|
settings->NSCodec = FALSE;
|
|
|
|
settings->JpegCodec = FALSE;
|
2012-09-16 04:29:33 +04:00
|
|
|
wf_peer_read_settings(client);
|
2012-08-14 23:12:44 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
client->PostConnect = wf_peer_post_connect;
|
|
|
|
client->Activate = wf_peer_activate;
|
2012-09-16 23:30:11 +04:00
|
|
|
client->Logon = wf_peer_logon;
|
2012-08-14 23:12:44 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
client->input->SynchronizeEvent = wf_peer_synchronize_event;
|
|
|
|
client->input->KeyboardEvent = wf_peer_keyboard_event;
|
|
|
|
client->input->UnicodeKeyboardEvent = wf_peer_unicode_keyboard_event;
|
|
|
|
client->input->MouseEvent = wf_peer_mouse_event;
|
|
|
|
client->input->ExtendedMouseEvent = wf_peer_extended_mouse_event;
|
2012-08-18 22:34:24 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
client->Initialize(client);
|
|
|
|
context = (wfPeerContext*) client->context;
|
2012-09-03 01:09:36 +04:00
|
|
|
|
2012-10-08 23:46:01 +04:00
|
|
|
if (context->socketClose)
|
|
|
|
return 0;
|
|
|
|
|
2012-09-03 01:09:36 +04:00
|
|
|
wfi = context->info;
|
2012-10-05 23:25:30 +04:00
|
|
|
|
|
|
|
if (wfi->input_disabled == TRUE)
|
|
|
|
{
|
|
|
|
printf("client input is disabled\n");
|
|
|
|
client->input->KeyboardEvent = wf_peer_keyboard_event_dummy;
|
|
|
|
client->input->UnicodeKeyboardEvent = wf_peer_unicode_keyboard_event_dummy;
|
|
|
|
client->input->MouseEvent = wf_peer_mouse_event_dummy;
|
|
|
|
client->input->ExtendedMouseEvent = wf_peer_extended_mouse_event_dummy;
|
|
|
|
}
|
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
context->socketEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
2013-03-13 01:03:13 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
context->socketSemaphore = CreateSemaphore(NULL, 0, 1, NULL);
|
|
|
|
context->socketThread = CreateThread(NULL, 0, wf_peer_socket_listener, client, 0, NULL);
|
2012-08-19 01:49:52 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
printf("We've got a client %s\n", client->local ? "(local)" : client->hostname);
|
|
|
|
|
|
|
|
nCount = 0;
|
|
|
|
handles[nCount++] = context->updateEvent;
|
|
|
|
handles[nCount++] = context->socketEvent;
|
|
|
|
|
|
|
|
while (1)
|
2012-08-19 01:49:52 +04:00
|
|
|
{
|
2012-09-16 04:29:33 +04:00
|
|
|
status = WaitForMultipleObjects(nCount, handles, FALSE, INFINITE);
|
|
|
|
|
2012-09-20 08:22:13 +04:00
|
|
|
if ((status == WAIT_FAILED) || (status == WAIT_TIMEOUT))
|
|
|
|
{
|
|
|
|
printf("WaitForMultipleObjects failed\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
if (WaitForSingleObject(context->updateEvent, 0) == 0)
|
2012-09-03 03:54:17 +04:00
|
|
|
{
|
2012-09-16 04:29:33 +04:00
|
|
|
if (client->activated)
|
|
|
|
wf_update_peer_send(wfi, context);
|
2012-08-30 23:50:46 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
ResetEvent(context->updateEvent);
|
|
|
|
ReleaseSemaphore(wfi->updateSemaphore, 1, NULL);
|
|
|
|
}
|
2012-08-19 01:49:52 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
if (WaitForSingleObject(context->socketEvent, 0) == 0)
|
|
|
|
{
|
2012-10-09 10:31:28 +04:00
|
|
|
if (client->CheckFileDescriptor(client) != TRUE)
|
2012-09-16 04:29:33 +04:00
|
|
|
{
|
2013-03-13 01:03:13 +04:00
|
|
|
//printf("Failed to check peer file descriptor\n");
|
2012-09-16 04:29:33 +04:00
|
|
|
context->socketClose = TRUE;
|
|
|
|
}
|
2012-09-18 01:05:42 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
ResetEvent(context->socketEvent);
|
|
|
|
ReleaseSemaphore(context->socketSemaphore, 1, NULL);
|
2012-08-18 22:34:24 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
if (context->socketClose)
|
|
|
|
break;
|
|
|
|
}
|
2012-10-05 23:25:30 +04:00
|
|
|
|
|
|
|
//force disconnect
|
|
|
|
if(wfi->force_all_disconnect == TRUE)
|
|
|
|
{
|
|
|
|
printf("Forcing Disconnect -> ");
|
|
|
|
break;
|
|
|
|
}
|
2012-10-12 01:14:55 +04:00
|
|
|
|
2012-10-11 05:42:18 +04:00
|
|
|
/* FIXME: we should wait on this, instead of calling it every time */
|
|
|
|
if (WTSVirtualChannelManagerCheckFileDescriptor(context->vcm) != TRUE)
|
|
|
|
break;
|
2012-08-24 00:35:54 +04:00
|
|
|
}
|
2012-09-04 02:38:51 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
printf("Client %s disconnected.\n", client->local ? "(local)" : client->hostname);
|
2012-09-04 02:38:51 +04:00
|
|
|
|
2012-09-17 05:05:51 +04:00
|
|
|
if (WaitForSingleObject(context->updateEvent, 0) == 0)
|
|
|
|
{
|
|
|
|
ResetEvent(context->updateEvent);
|
|
|
|
ReleaseSemaphore(wfi->updateSemaphore, 1, NULL);
|
|
|
|
}
|
2012-09-04 02:38:51 +04:00
|
|
|
|
2012-09-17 07:09:36 +04:00
|
|
|
wf_update_peer_deactivate(wfi, context);
|
2012-09-04 02:38:51 +04:00
|
|
|
|
2012-09-17 05:50:15 +04:00
|
|
|
client->Disconnect(client);
|
2012-09-04 02:38:51 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
freerdp_peer_context_free(client);
|
|
|
|
freerdp_peer_free(client);
|
2012-09-04 02:38:51 +04:00
|
|
|
|
2012-09-16 04:29:33 +04:00
|
|
|
return 0;
|
2012-12-14 09:58:48 +04:00
|
|
|
}
|