当前位置: 首页>>代码示例>>C++>>正文


C++ DEBUG_WARN函数代码示例

本文整理汇总了C++中DEBUG_WARN函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUG_WARN函数的具体用法?C++ DEBUG_WARN怎么用?C++ DEBUG_WARN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DEBUG_WARN函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: rdpsnd_process_connect

static void rdpsnd_process_connect(rdpSvcPlugin* plugin)
{
	rdpsndPlugin* rdpsnd = (rdpsndPlugin*) plugin;
	RDP_PLUGIN_DATA* data;
	RDP_PLUGIN_DATA default_data[2] = { { 0 }, { 0 } };

	DEBUG_SVC("connecting");

	plugin->interval_callback = rdpsnd_process_interval;

	rdpsnd->data_out_list = list_new();
	rdpsnd->latency = -1;

	data = (RDP_PLUGIN_DATA*)plugin->channel_entry_points.pExtendedData;

	while (data && data->size > 0)
	{
		rdpsnd_process_plugin_data(rdpsnd, data);
		data = (RDP_PLUGIN_DATA*) (((uint8*) data) + data->size);
	}

	if (rdpsnd->device == NULL)
	{
		default_data[0].size = sizeof(RDP_PLUGIN_DATA);
		default_data[0].data[0] = "pulse";
		default_data[0].data[1] = "";
		if (!rdpsnd_load_device_plugin(rdpsnd, "pulse", default_data))
		{
			default_data[0].data[0] = "alsa";
			default_data[0].data[1] = "default";

			if (!rdpsnd_load_device_plugin(rdpsnd, "alsa", default_data))
			{
				default_data[0].data[0] = "macaudio";
				default_data[0].data[1] = "default";
				
				rdpsnd_load_device_plugin(rdpsnd, "macaudio", default_data);
			}
			else
			{
				printf("rdpsnd: successfully loaded alsa plugin\n");
			}
		}
		else
		{
			printf("rdpsnd: successfully loaded pulseaudio plugin\n");
		}
	}
	if (rdpsnd->device == NULL)
	{
		DEBUG_WARN("no sound device.");
	}
}
开发者ID:Cyclic,项目名称:FreeRDP,代码行数:53,代码来源:rdpsnd_main.c

示例2: drdynvc_push_event

int drdynvc_push_event(drdynvcPlugin* drdynvc, RDP_EVENT* event)
{
	int error;

	error = svc_plugin_send_event((rdpSvcPlugin*)drdynvc, event);
	if (error != CHANNEL_RC_OK)
	{
		DEBUG_WARN("pVirtualChannelEventPush failed %d", error);
		return 1;
	}
	return 0;
}
开发者ID:5m3ntarios,项目名称:FreeRDP,代码行数:12,代码来源:drdynvc_main.c

示例3: rfx_process_message_channels

static BOOL rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s)
{
	BYTE channelId;
	BYTE numChannels;

	if (stream_get_left(s) < 1)
	{
		DEBUG_WARN("RfxMessageChannels packet too small");
		return FALSE;
	}

	stream_read_BYTE(s, numChannels); /* numChannels (1 byte), must bet set to 0x01 */

	/* In RDVH sessions, numChannels will represent the number of virtual monitors 
	 * configured and does not always be set to 0x01 as [MS-RDPRFX] said.
	 */
	if (numChannels < 1)
	{
		DEBUG_WARN("numChannels:%d, expected:1", numChannels);
		return TRUE;
	}

	if (stream_get_left(s) < numChannels * 5)
	{
		DEBUG_WARN("RfxMessageChannels packet too small for numChannels=%d", numChannels);
		return FALSE;
	}

	/* RFX_CHANNELT */
	stream_read_BYTE(s, channelId); /* channelId (1 byte) */
	stream_read_UINT16(s, context->width); /* width (2 bytes) */
	stream_read_UINT16(s, context->height); /* height (2 bytes) */

	/* Now, only the first monitor can be used, therefore the other channels will be ignored. */
	stream_seek(s, 5 * (numChannels - 1));

	DEBUG_RFX("numChannels %d id %d, %dx%d.",
		numChannels, channelId, context->width, context->height);
	return TRUE;
}
开发者ID:nour8394,项目名称:FreeRDP,代码行数:40,代码来源:rfx.c

示例4: smartcard_check_for_duplicate_id

static BOOL smartcard_check_for_duplicate_id(SMARTCARD_DEVICE* smartcard, UINT32 CompletionId)
{
	BOOL duplicate;
	LIST_ITEM* item;
	COMPLETIONIDINFO* CompletionIdInfo;

	/*
	 * Search from the end of the LIST for one outstanding "CompletionID"
	 * that matches the one passed in.  Remove it from the list and free the
	 * memory associated with it.  Return whether or not it was marked
	 * as a duplicate.
	 */

	for (item = smartcard->CompletionIds->tail; item; item = item->prev)
	{
	        CompletionIdInfo = (COMPLETIONIDINFO*) item->data;

	        if (CompletionIdInfo->ID == CompletionId)
	        {
	                duplicate = CompletionIdInfo->duplicate;

	                if (duplicate)
	                {
	                        DEBUG_WARN("CompletionID number %u was previously marked as a duplicate.", CompletionId);
	                }

	                list_remove(smartcard->CompletionIds, CompletionIdInfo);
	                free(CompletionIdInfo);

	                return duplicate;
	        }
	}

	/* This function should only be called when there is
	 * at least one outstanding CompletionID item in the list.
	 */
	DEBUG_WARN("Error!!! No CompletionIDs (or no matching IDs) in the list!");

	return FALSE;
}
开发者ID:ADILOFASKI,项目名称:FreeRDP,代码行数:40,代码来源:smartcard_main.c

示例5: crypto_cert_print_info

void crypto_cert_print_info(X509* xcert)
{
	char* fp;
	char* issuer;
	char* subject;

	subject = crypto_cert_subject(xcert);
	issuer = crypto_cert_issuer(xcert);
	fp = crypto_cert_fingerprint(xcert);
	if (!fp)
	{
		DEBUG_WARN( "%s: error computing fingerprint\n", __FUNCTION__);
		goto out_free_issuer;
	}

	DEBUG_WARN( "Certificate details:\n");
	DEBUG_WARN( "\tSubject: %s\n", subject);
	DEBUG_WARN( "\tIssuer: %s\n", issuer);
	DEBUG_WARN( "\tThumbprint: %s\n", fp);
	DEBUG_WARN( "The above X.509 certificate could not be verified, possibly because you do not have "
			"the CA certificate in your certificate store, or the certificate has expired. "
			"Please look at the documentation on how to create local certificate store for a private CA.\n");

	free(fp);
out_free_issuer:
	free(issuer);
	free(subject);
}
开发者ID:kldmurshed,项目名称:FreeRDP,代码行数:28,代码来源:crypto.c

示例6: parallel_process_irp_create

static void parallel_process_irp_create(PARALLEL_DEVICE* parallel, IRP* irp)
{
	uint32 PathLength;
	char* path;
	UNICONV* uniconv;

	stream_seek(irp->input, 28);
	/* DesiredAccess(4) AllocationSize(8), FileAttributes(4) */
	/* SharedAccess(4) CreateDisposition(4), CreateOptions(4) */
	stream_read_uint32(irp->input, PathLength);

	uniconv = freerdp_uniconv_new();
	path = freerdp_uniconv_in(uniconv, stream_get_tail(irp->input), PathLength);
	freerdp_uniconv_free(uniconv);

	parallel->id = irp->devman->id_sequence++;
	parallel->file = open(parallel->path, O_RDWR);
	if (parallel->file < 0)
	{
		irp->IoStatus = STATUS_ACCESS_DENIED;
		parallel->id = 0;

		DEBUG_WARN("failed to create %s: %s", parallel->path, strerror(errno));
	}
	else
	{
		/* all read and write operations should be non-blocking */
		if (fcntl(parallel->file, F_SETFL, O_NONBLOCK) == -1)
			DEBUG_WARN("%s fcntl %s", path, strerror(errno));

		DEBUG_SVC("%s(%d) created", parallel->path, parallel->file);
	}

	stream_write_uint32(irp->output, parallel->id);
	stream_write_uint8(irp->output, 0);

	xfree(path);

	irp->Complete(irp);
}
开发者ID:ArvidNorr,项目名称:FreeRDP,代码行数:40,代码来源:parallel_main.c

示例7: wf_info_peer_register

void wf_info_peer_register(wfInfo* wfi, wfPeerContext* context)
{
	if (wf_info_lock(wfi) > 0)
	{
		int i;
		int peerId;
		if (wfi->peerCount == WF_INFO_MAXPEERS)
		{
			context->socketClose = TRUE;
			wf_info_unlock(wfi);
			return;
		}

		context->info = wfi;
		context->updateEvent = CreateEvent(NULL, TRUE, FALSE, NULL);

		//get the offset of the top left corner of selected screen
		EnumDisplayMonitors(NULL, NULL, wf_info_monEnumCB, 0);
		_IDcount = 0;

#ifdef WITH_DXGI_1_2
		if (wfi->peerCount == 0)
			wf_dxgi_init(wfi);
#else
		if (wf_mirror_driver_activate(wfi) == FALSE)
		{
			context->socketClose = TRUE;
			wf_info_unlock(wfi);
			return;
		}
#endif
		//look trhough the array of peers until an empty slot
		for(i=0; i<WF_INFO_MAXPEERS; ++i)
		{
			//empty index will be our peer id
			if (wfi->peers[i] == NULL)
			{
				peerId = i;
				break;
			}
		}

		wfi->peers[peerId] = ((rdpContext*) context)->peer;
		wfi->peers[peerId]->pId = peerId;
		wfi->peerCount++;
		DEBUG_WARN("Registering Peer: id=%d #=%d\n", peerId, wfi->peerCount);

		wf_info_unlock(wfi);

		wfreerdp_server_peer_callback_event(peerId, WF_SRV_CALLBACK_EVENT_CONNECT);
	}
}
开发者ID:alexeilebedev,项目名称:FreeRDP,代码行数:52,代码来源:wf_info.c

示例8: dvcman_receive_channel_data

int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint8* data, uint32 data_size)
{
    DVCMAN_CHANNEL* channel;
    int error = 0;

    channel = dvcman_find_channel_by_id(pChannelMgr, ChannelId);
    if (channel == NULL)
    {
        DEBUG_WARN("ChannelId %d not found!", ChannelId);
        return 1;
    }

    if (channel->dvc_data)
    {
        /* Fragmented data */
        if (stream_get_length(channel->dvc_data) + data_size > stream_get_size(channel->dvc_data))
        {
            DEBUG_WARN("data exceeding declared length!");
            stream_free(channel->dvc_data);
            channel->dvc_data = NULL;
            return 1;
        }
        stream_write(channel->dvc_data, data, data_size);
        if (stream_get_length(channel->dvc_data) >= stream_get_size(channel->dvc_data))
        {
            error = channel->channel_callback->OnDataReceived(channel->channel_callback,
                    stream_get_size(channel->dvc_data), stream_get_data(channel->dvc_data));
            stream_free(channel->dvc_data);
            channel->dvc_data = NULL;
        }
    }
    else
    {
        error = channel->channel_callback->OnDataReceived(channel->channel_callback,
                data_size, data);
    }

    return error;
}
开发者ID:lvyu,项目名称:FreeRDP-1.0,代码行数:39,代码来源:dvcman.c

示例9: dvcman_close_channel_iface

static int dvcman_close_channel_iface(IWTSVirtualChannel* pChannel)
{
    DVCMAN_CHANNEL* channel = (DVCMAN_CHANNEL*)pChannel;
    DVCMAN* dvcman = channel->dvcman;

    DEBUG_DVC("id=%d", channel->channel_id);

    if (list_remove(dvcman->channels, channel) == NULL)
        DEBUG_WARN("channel not found");
    dvcman_channel_free(channel);

    return 1;
}
开发者ID:lvyu,项目名称:FreeRDP-1.0,代码行数:13,代码来源:dvcman.c

示例10: region16_print

void region16_print(const REGION16 *region)
{
	const RECTANGLE_16 *rects;
	int nbRects, i;
	int currentBandY = -1;

	rects = region16_rects(region, &nbRects);
	DEBUG_WARN( "nrects=%d", nbRects);

	for (i = 0; i < nbRects; i++, rects++)
	{
		if (rects->top != currentBandY)
		{
			currentBandY = rects->top;
			DEBUG_WARN( "\nband %d: ", currentBandY);
		}

		DEBUG_WARN( "(%d,%d-%d,%d)", rects->left, rects->top, rects->right, rects->bottom);
	}

	DEBUG_WARN( "\n");
}
开发者ID:JozLes77,项目名称:FreeRDP,代码行数:22,代码来源:region.c

示例11: tsmf_ffmpeg_init_context

static boolean tsmf_ffmpeg_init_context(ITSMFDecoder* decoder)
{
	TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;

	mdecoder->codec_context = avcodec_alloc_context();
	if (!mdecoder->codec_context)
	{
		DEBUG_WARN("avcodec_alloc_context failed.");
		return False;
	}

	return True;
}
开发者ID:kidfolk,项目名称:FreeRDP,代码行数:13,代码来源:tsmf_ffmpeg.c

示例12: drive_file_query_information

BOOL drive_file_query_information(DRIVE_FILE* file, UINT32 FsInformationClass, wStream* output)
{
	struct STAT st;

	if (STAT(file->fullpath, &st) != 0)
	{
		Stream_Write_UINT32(output, 0); /* Length */
		return FALSE;
	}

	switch (FsInformationClass)
	{
		case FileBasicInformation:
			/* http://msdn.microsoft.com/en-us/library/cc232094.aspx */
			Stream_Write_UINT32(output, 36); /* Length */
			Stream_EnsureRemainingCapacity(output, 36);
			Stream_Write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* CreationTime */
			Stream_Write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_atime)); /* LastAccessTime */
			Stream_Write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* LastWriteTime */
			Stream_Write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* ChangeTime */
			Stream_Write_UINT32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */
			/* Reserved(4), MUST NOT be added! */
			break;

		case FileStandardInformation:
			/*  http://msdn.microsoft.com/en-us/library/cc232088.aspx */
			Stream_Write_UINT32(output, 22); /* Length */
			Stream_EnsureRemainingCapacity(output, 22);
			Stream_Write_UINT64(output, st.st_size); /* AllocationSize */
			Stream_Write_UINT64(output, st.st_size); /* EndOfFile */
			Stream_Write_UINT32(output, st.st_nlink); /* NumberOfLinks */
			Stream_Write_UINT8(output, file->delete_pending ? 1 : 0); /* DeletePending */
			Stream_Write_UINT8(output, file->is_dir ? 1 : 0); /* Directory */
			/* Reserved(2), MUST NOT be added! */
			break;

		case FileAttributeTagInformation:
			/* http://msdn.microsoft.com/en-us/library/cc232093.aspx */
			Stream_Write_UINT32(output, 8); /* Length */
			Stream_EnsureRemainingCapacity(output, 8);
			Stream_Write_UINT32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */
			Stream_Write_UINT32(output, 0); /* ReparseTag */
			break;

		default:
			Stream_Write_UINT32(output, 0); /* Length */
			DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass);
			return FALSE;
	}
	return TRUE;
}
开发者ID:pevik,项目名称:debian-freerdp,代码行数:51,代码来源:drive_file.c

示例13: cliprdr_process_receive

static void cliprdr_process_receive(rdpSvcPlugin* plugin, wStream* s)
{
	UINT16 msgType;
	UINT16 msgFlags;
	UINT32 dataLen;
	cliprdrPlugin* cliprdr = (cliprdrPlugin*) plugin;

	Stream_Read_UINT16(s, msgType);
	Stream_Read_UINT16(s, msgFlags);
	Stream_Read_UINT32(s, dataLen);

	DEBUG_CLIPRDR("msgType: %s (%d), msgFlags: %d dataLen: %d",
		CB_MSG_TYPE_STRINGS[msgType], msgType, msgFlags, dataLen);

#ifdef WITH_DEBUG_CLIPRDR
	winpr_HexDump(Stream_Buffer(s), dataLen + 8);
#endif

	switch (msgType)
	{
		case CB_CLIP_CAPS:
			cliprdr_process_clip_caps(cliprdr, s, dataLen, msgFlags);
			break;

		case CB_MONITOR_READY:
			cliprdr_process_monitor_ready(cliprdr, s, dataLen, msgFlags);
			break;

		case CB_FORMAT_LIST:
			cliprdr_process_format_list(cliprdr, s, dataLen, msgFlags);
			break;

		case CB_FORMAT_LIST_RESPONSE:
			cliprdr_process_format_list_response(cliprdr, s, dataLen, msgFlags);
			break;

		case CB_FORMAT_DATA_REQUEST:
			cliprdr_process_format_data_request(cliprdr, s, dataLen, msgFlags);
			break;

		case CB_FORMAT_DATA_RESPONSE:
			cliprdr_process_format_data_response(cliprdr, s, dataLen, msgFlags);
			break;

		default:
			DEBUG_WARN("unknown msgType %d", msgType);
			break;
	}

	Stream_Free(s, TRUE);
}
开发者ID:HUTTAMI,项目名称:FreeRDP,代码行数:51,代码来源:cliprdr_main.c

示例14: rdpsnd_pulse_play

static void rdpsnd_pulse_play(rdpsndDevicePlugin* device, uint8* data, int size)
{
	rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*)device;
	int len;
	int ret;
	uint8* decoded_data;
	uint8* src;
	int decoded_size;

	if (!pulse->stream)
		return;

	if (pulse->format == 0x11)
	{
		decoded_data = dsp_decode_ima_adpcm(&pulse->adpcm,
			data, size, pulse->sample_spec.channels, pulse->block_size, &decoded_size);
		size = decoded_size;
		src = decoded_data;
	}
	else
	{
		decoded_data = NULL;
		src = data;
	}

	pa_threaded_mainloop_lock(pulse->mainloop);
	while (size > 0)
	{
		while ((len = pa_stream_writable_size(pulse->stream)) == 0)
		{
			pa_threaded_mainloop_wait(pulse->mainloop);
		}
		if (len < 0)
			break;
		if (len > size)
			len = size;
		ret = pa_stream_write(pulse->stream, src, len, NULL, 0LL, PA_SEEK_RELATIVE);
		if (ret < 0)
		{
			DEBUG_WARN("pa_stream_write failed (%d)",
				pa_context_errno(pulse->context));
			break;
		}
		src += len;
		size -= len;
	}
	pa_threaded_mainloop_unlock(pulse->mainloop);

	if (decoded_data)
		xfree(decoded_data);
}
开发者ID:roman-b,项目名称:FreeRDP-1.0,代码行数:51,代码来源:rdpsnd_pulse.c

示例15: dvcman_create_listener

static int dvcman_create_listener(IWTSVirtualChannelManager *pChannelMgr,
								  const char *pszChannelName, UINT32 ulFlags,
								  IWTSListenerCallback *pListenerCallback, IWTSListener **ppListener)
{
	DVCMAN *dvcman = (DVCMAN *) pChannelMgr;
	DVCMAN_LISTENER *listener;
	assert(dvcman);

	if (dvcman->num_listeners < MAX_PLUGINS)
	{
		DEBUG_DVC("%d.%s.", dvcman->num_listeners, pszChannelName);
		listener = (DVCMAN_LISTENER *) calloc(1, sizeof(DVCMAN_LISTENER));

		if (!listener)
		{
			DEBUG_WARN("calloc failed %s (%d)!", strerror(errno), errno);
			return 2;
		}

		listener->iface.GetConfiguration = dvcman_get_configuration;
		listener->iface.pInterface = NULL;
		listener->dvcman = dvcman;
		listener->channel_name = _strdup(pszChannelName);
		listener->flags = ulFlags;
		listener->listener_callback = pListenerCallback;

		if (ppListener)
			*ppListener = (IWTSListener *) listener;

		dvcman->listeners[dvcman->num_listeners++] = (IWTSListener *) listener;
		return 0;
	}
	else
	{
		DEBUG_WARN("Maximum DVC listener number reached.");
		return 1;
	}
}
开发者ID:Auto-Droid,项目名称:FreeRDP,代码行数:38,代码来源:dvcman.c


注:本文中的DEBUG_WARN函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。