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


C++ DEBUG0函数代码示例

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


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

示例1: QMS_Trace

/**
 * @brief Cleanup the parser we created
 * 
 * This has to be done after we are all done with the parsers that
 * were used.
 */
void 
Test_Client::parser_cleanup(void)
{
  QMS_Trace("Test_Client::parser_cleanup",__LINE__, __FILE__);
  DEBUG0(DEBUG_L_ENTER, "DEBUG:Test_Client::parser_cleanup\n");
  // Terminate the parser before the end. This belongs in a destructor
  if(!this->_parser_initialized)
   {
     return;
   } /* end of if(!this->_parser_initialized) */
  
  try 
   {
     XMLPlatformUtils::Terminate();
     this->_parser_initialized = false;
   }
  catch(const XMLException& toCatch)
   {
     cerr << "Error during Xerces-c termination.\n"
          << "  Exception message:"
          << toCatch.getMessage()
          << endl;
   }
  catch (...)
   {
     cerr << "Error during Xerces-c termination.\n";
   }
  DEBUG0(4, "DEBUG:parser_cleanup done\n");
}
开发者ID:srivasta,项目名称:QMS,代码行数:35,代码来源:Client.cpp

示例2: mock_message

/** @fn void mock_message(void)
 *  @brief  Generate a test Remos Query randomly
 *
 * Here we generate a mock query statically, incrementing the request
 * ID every time we are invoked. We instantiate a struct Query_struct,
 * populate it, and use a QMS_Remos_Msg object to facilitate
 * conversion to XML
 */
void
mock_message(void)
{
  QMS_Trace ("mock_message", __LINE__, __FILE__);
  Query_struct query;
  ACE_Write_Guard<ACE_Thread_Mutex> guard(TD_asset_guard);
  {
    query.request_id = count++;
  }
  query.request_id = 0;
  query.repeat_count = 5;
  query.refresh_rate = 2.45;
  query.type = Query_struct::link;
  query.host_names = "skywalker_t.stdc.com,kenobee_t.stdc.com,c3po_t.stdc.com";
  DEBUG0 (DEBUG_L_CALL, "DEBUG Created Query\n");
  cout << "============================================================"
       <<endl;
  print_query(&query);
  cout << "============================================================"
       <<endl;

  QMS_Remos_Msg message;
  message.insert(query);
  string data = message.as_string();
  qms_api.send(data);
  DEBUG0 (DEBUG_L_LEAVE, "DEBUG Sending all done\n");
}
开发者ID:srivasta,项目名称:QMS,代码行数:35,代码来源:test_desi.cpp

示例3: truetalkSend

void
truetalkSend(char *buf, KQMLPerformative *perf)
{
    unsigned long marker;

    DEBUG1("sending \"%s\"", buf);
    /* Save this performative for use by callbacks */
    currentPerf = perf;
    /* We haven't said anything yet... */
    startedSpeaking = 0;
    /* Temporary for transcripting (send now so it appears with speech) */
    sendSpokenMsg(buf);
    /* Send the line to TrueTalk (will callback ttCB() with output) */
    marker = TT_SendText(myclient, buf, strlen(buf));
    if (!marker) {
	ERROR1("TT_SendText failed: %s\n", TT_DecodeLastError());
    }
    /* Let server finish with this text before sending new stuff */
    DEBUG0("waiting for TrueTalk to finish");
    if (!TT_Sync(myclient, marker)) {
	ERROR1("TT_Sync failed: %s\n", TT_DecodeLastError());
    }
    /* Sync with server */
    DEBUG0("syncing server");
    audioSync();
    /* We're done speaking */
    sendStoppedSpeakingMsg();
    /* Send done reply */
    if (perf != NULL) {
	DEBUG0("replying");
	sendDoneReply(perf);
    }
    /* Done */
    DEBUG0("done");
}
开发者ID:wdebeaum,项目名称:cabot,代码行数:35,代码来源:truetalk.c

示例4: tts_init

int
tts_init(char *voice, char *dictfile)
{
    VoiceSpec vspec;
    int useDefaultVoice = 1;

    DEBUG0("creating semaphore");
    if ((sem = sem_open("speechout-mac.lock", O_CREAT, 0700, 0)) == (sem_t*)SEM_FAILED) {
	SYSERR0("sem_open failed");
	return -1;
    }
    if (voice != NULL) {
	DEBUG0("getting voice spec");
	if (getVoiceSpec(voice, &vspec) != 0) {
	    ERROR1("no voice named \"%s\"", voice);
	    return(-1);
	}
	useDefaultVoice = 0;
    }
    DEBUG0("creating speech channel");
    channel = createNewSpeechChannel(useDefaultVoice ? NULL : &vspec);
    if (channel == NULL) {
	return(-1);
    }
    if (dictfile) {
	DEBUG0("installing pronunciation dictionary");
	installPronunciationDictionary(channel, dictfile);
    }
    DEBUG0("done");
    return 0;
}
开发者ID:wdebeaum,项目名称:cabot,代码行数:31,代码来源:tts.c

示例5: audioClose_SUN

void
audioClose_SUN(void)
{
    DEBUG0("closing audio device");
    close(audioFd);
    DEBUG0("done");
}
开发者ID:wdebeaum,项目名称:cabot,代码行数:7,代码来源:audio_sun.c

示例6: truetalkClose

void
truetalkClose(void)
{
    DEBUG0("closing connection to TrueTalk");
    TT_Close(myclient, server);
    DEBUG0("done");
}
开发者ID:wdebeaum,项目名称:cabot,代码行数:7,代码来源:truetalk.c

示例7: maybe_populate_impl

static bool
maybe_populate_impl(
        const char* name,
        const char* description,
              T&    destination,
        const T&    source,
        const bool  verbose,
        bool (* const default_value)(const T& v))
{
    if (default_value(destination)) {
        if (verbose) {
            // Populating a default isn't interesting, hence DEBUG0
            if (description) {
                DEBUG0("Populating " << name
                      << " (" << description << ") to be " << source);
            } else {
                DEBUG0("Populating " << name << " to be " << source);
            }
        }
        destination = source;
        return true;
    }

    if (verbose) {
        if (description) {
            // Retaining an existing setting is interesting, hence INFO0
            INFO0("Clutching onto " << name
                   << " (" << description << ") of " << destination);
        } else {
            INFO0("Clutching onto " << name << " of " << destination);
        }
    }
    return false;
}
开发者ID:RhysU,项目名称:suzerain,代码行数:34,代码来源:populatable.hpp

示例8: DEBUG0

PRIVATE void free_work
(
    WorkType *Work
)
{
    DEBUG0 (("work free:\n")) ;
    if (Work)
    {
	/* these 16 objects do exist */
	Work->Wx = (Entry *) UMF_free ((void *) Work->Wx) ;
	Work->Wy = (Entry *) UMF_free ((void *) Work->Wy) ;
	Work->Frpos = (Int *) UMF_free ((void *) Work->Frpos) ;
	Work->Fcpos = (Int *) UMF_free ((void *) Work->Fcpos) ;
	Work->Lpattern = (Int *) UMF_free ((void *) Work->Lpattern) ;
	Work->Upattern = (Int *) UMF_free ((void *) Work->Upattern) ;
	Work->Wp = (Int *) UMF_free ((void *) Work->Wp) ;
	Work->Wrp = (Int *) UMF_free ((void *) Work->Wrp) ;
	Work->Frows = (Int *) UMF_free ((void *) Work->Frows) ;
	Work->Fcols = (Int *) UMF_free ((void *) Work->Fcols) ;
	Work->Wio = (Int *) UMF_free ((void *) Work->Wio) ;
	Work->Woi = (Int *) UMF_free ((void *) Work->Woi) ;
	Work->Woo = (Int *) UMF_free ((void *) Work->Woo) ;
	Work->Wm = (Int *) UMF_free ((void *) Work->Wm) ;
	Work->E = (Int *) UMF_free ((void *) Work->E) ;
	Work->Front_new1strow =
	    (Int *) UMF_free ((void *) Work->Front_new1strow) ;

	/* these objects might not exist */
	Work->Diagonal_map = (Int *) UMF_free ((void *) Work->Diagonal_map) ;
	Work->Diagonal_imap = (Int *) UMF_free ((void *) Work->Diagonal_imap) ;
    }
    DEBUG0 (("work free done.\n")) ;
}
开发者ID:Sunwinds,项目名称:user-study-graphics,代码行数:33,代码来源:umfpack_numeric.hpp

示例9: format_ogg_attach_header

/* routine for taking the provided page (should be a header page) and
 * placing it on the collection of header pages
 */
void format_ogg_attach_header (ogg_codec_t *codec, ogg_page *page)
{
    ogg_state_t *ogg_info = codec->parent;
    refbuf_t *refbuf;
    
    if (codec->filtered)
        return;

    refbuf = make_refbuf_with_page (codec, page);

    if (ogg_page_bos (page))
    {
        DEBUG0 ("attaching BOS page");
        if (*ogg_info->bos_end == NULL)
            ogg_info->header_pages_tail = refbuf;
        refbuf->associated = *ogg_info->bos_end;
        *ogg_info->bos_end = refbuf;
        ogg_info->bos_end = &refbuf->associated;
        return;
    }
    DEBUG0 ("attaching header page");
    if (ogg_info->header_pages_tail)
        ogg_info->header_pages_tail->associated = refbuf;
    ogg_info->header_pages_tail = refbuf;

    if (ogg_info->header_pages == NULL)
        ogg_info->header_pages = refbuf;
}
开发者ID:creativeprogramming,项目名称:icecast-ra,代码行数:31,代码来源:format_ogg.c

示例10: udpSend

SmpStatusType	udpSend (SmpSocketType udp, CBytePtrType bp, CIntfType n)
{
	UdpPtrType		tp;
	int			result;

	if (udp == (SmpSocketType) 0) {
		return (errBad);
	}

	DEBUG0 ("udpSend:\n");
	DEBUGBYTES (bp, n);
	DEBUG0 ("\n");

	tp = (UdpPtrType) udp;
	do {	
		result = sendto (tp->udpSocket, (char *) bp,
			(int) n, (int) 0,
			& (tp->udpSockAddr), sizeof (struct sockaddr_in));
		n -= result;
		bp += result;

	} while ((result > 0) && (n > 0));

	if (result < 0) {
		perror ("udpSend");
		return (errBad);
	}
	else {
		return (errOk);
	}
}
开发者ID:Claruarius,项目名称:stblinux-2.6.37,代码行数:31,代码来源:udp.c

示例11: audioSync_SUN

void
audioSync_SUN(void)
{
    DEBUG0("draining audio device");
    ioctl(audioFd, AUDIO_DRAIN);
    DEBUG0("done");
}
开发者ID:wdebeaum,项目名称:cabot,代码行数:7,代码来源:audio_sun.c

示例12: source_update_settings

/* update the specified source with details from the config or mount.
 * mountinfo can be NULL in which case default settings should be taken
 */
void source_update_settings (ice_config_t *config, source_t *source, mount_proxy *mountinfo)
{
    /*  skip if source is a fallback to file */
    if (source->running && source->client == NULL)
    {
        stats_event_hidden (source->mount, NULL, 1);
        return;
    }
    /* set global settings first */
    source->queue_size_limit = config->queue_size_limit;
    source->timeout = config->source_timeout;
    source->burst_size = config->burst_size;

    stats_event_args (source->mount, "listenurl", "http://%s:%d%s",
            config->hostname, config->port, source->mount);

    source_apply_mount (source, mountinfo);

    if (source->fallback_mount)
        DEBUG1 ("fallback %s", source->fallback_mount);
    if (mountinfo && mountinfo->intro_filename)
        DEBUG1 ("intro file is %s", mountinfo->intro_filename);
    if (source->dumpfilename)
        DEBUG1 ("Dumping stream to %s", source->dumpfilename);
    if (mountinfo && mountinfo->on_connect)
        DEBUG1 ("connect script \"%s\"", mountinfo->on_connect);
    if (mountinfo && mountinfo->on_disconnect)
        DEBUG1 ("disconnect script \"%s\"", mountinfo->on_disconnect);
    if (source->on_demand)
    {
        DEBUG0 ("on_demand set");
        stats_event (source->mount, "on_demand", "1");
        stats_event_args (source->mount, "listeners", "%ld", source->listeners);
    }
    else
        stats_event (source->mount, "on_demand", NULL);

    if (source->hidden)
    {
        stats_event_hidden (source->mount, NULL, 1);
        DEBUG0 ("hidden from public");
    }
    else
        stats_event_hidden (source->mount, NULL, 0);

    if (source->max_listeners == -1)
        stats_event (source->mount, "max_listeners", "unlimited");
    else
    {
        char buf [10];
        snprintf (buf, sizeof (buf), "%ld", source->max_listeners);
        stats_event (source->mount, "max_listeners", buf);
    }
    DEBUG1 ("public set to %d", source->yp_public);
    DEBUG1 ("max listeners to %ld", source->max_listeners);
    DEBUG1 ("queue size to %u", source->queue_size_limit);
    DEBUG1 ("burst size to %u", source->burst_size);
    DEBUG1 ("source timeout to %u", source->timeout);
    DEBUG1 ("fallback_when_full to %u", source->fallback_when_full);
}
开发者ID:asepsutiawan,项目名称:icecast,代码行数:63,代码来源:source.c

示例13: auth_new_listener

/* wrapper function for auth thread to authenticate new listener
 * connection details
 */
static void auth_new_listener (auth_client *auth_user)
{
    client_t *client = auth_user->client;

    /* make sure there is still a client at this point, a slow backend request
     * can be avoided if client has disconnected */
    if (allow_auth == 0 || is_listener_connected (client) == 0)
    {
        DEBUG0 ("dropping listener connection");
        client->respcode = 400;
        return;
    }
    if (auth_user->auth->authenticate)
    {
        switch (auth_user->auth->authenticate (auth_user))
        {
            case AUTH_OK:
            case AUTH_FAILED:
                break;
            default:
                return;
        }
    }
    if (auth_postprocess_listener (auth_user) < 0)
        DEBUG0 ("listener connection failed");
}
开发者ID:Yahav,项目名称:icecast-kh,代码行数:29,代码来源:auth.c

示例14: OurSpeechDoneCallBackProc

/*
 * Called by speech channel when all speech has been generated.
 */
void
OurSpeechDoneCallBackProc(SpeechChannel inSpeechChannel, long inRefCon)
{
    DEBUG0("posting semaphore");
    if (sem_post(sem) < 0) {
	SYSERR0("sem_post failed");
    }
    DEBUG0("done");
}
开发者ID:wdebeaum,项目名称:cabot,代码行数:12,代码来源:tts.c

示例15: command_shoutcast_metadata

static int command_shoutcast_metadata (client_t *client, source_t *source)
{
    const char *action;
    const char *value;
    int same_ip = 1;

    if (COMMAND_REQUIRE(client, "mode", action) < 0)
    {
        thread_mutex_unlock (&source->lock);
        return client_send_400 (client, "missing arg, mode");
    }

    if ((source->flags & SOURCE_SHOUTCAST_COMPAT) == 0)
    {
        thread_mutex_unlock (&source->lock);
        ERROR0 ("illegal request on non-shoutcast compatible stream");
        return client_send_400 (client, "Not a shoutcast compatible stream");
    }

    if (strcmp (action, "updinfo") == 0)
    {
        DEBUG0("Got shoutcast metadata update request");
        if (COMMAND_REQUIRE (client, "song", value) < 0)
        {
            thread_mutex_unlock (&source->lock);
            return client_send_400 (client, "missing arg, song");
        }
        if (source->client && strcmp (client->connection.ip, source->client->connection.ip) != 0)
            if (connection_check_admin_pass (client->parser) == 0)
                same_ip = 0;

        if (same_ip && source->format && source->format->set_tag)
        {
            httpp_set_query_param (client->parser, "mount", client->server_conn->shoutcast_mount);
            source->format->set_tag (source->format, "title", value, NULL);
            source->format->set_tag (source->format, NULL, NULL, NULL);

            DEBUG2("Metadata on mountpoint %s changed to \"%s\"", source->mount, value);
            thread_mutex_unlock (&source->lock);
            return html_success(client, "Metadata update successful");
        }
        thread_mutex_unlock (&source->lock);
        return client_send_400 (client, "mountpoint will not accept URL updates");
    }
    if (strcmp (action, "viewxml") == 0)
    {
        xmlDocPtr doc;
        DEBUG0("Got shoutcast viewxml request");
        thread_mutex_unlock (&source->lock);
        doc = stats_get_xml (STATS_ALL, source->mount);
        return admin_send_response (doc, client, XSLT, "viewxml.xsl");
    }
    thread_mutex_unlock (&source->lock);
    return client_send_400 (client, "No such action");
}
开发者ID:MechanisM,项目名称:icecast-kh,代码行数:55,代码来源:admin.c


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