• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ INFO1函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: sprintf

bool AtDrv::setWiFiConfig(char *ssid, int type, const char * password, long timeout)
{
	bool ret = false;
	char wifiConfBuf[MAX_WIFI_CONF_BUF_SIZE];
	char conSetting[MAX_TEMP_BUF_SIZE];

	if(type == ENC_TYPE_NONE)
		sprintf(conSetting, "%s,none,", ssid);
	else if(type == ENC_TYPE_WEP_OPEN)
		sprintf(conSetting, "%s,wep_open,%s", ssid, password);
	else
		sprintf(conSetting, "%s,auto,%s", ssid, password);

	sprintf(wifiConfBuf, at_wifi_conf, conSetting);
	
	clearSerialRxData();
	INFO1(wifiConfBuf);
	serialPort[0]->print(wifiConfBuf);
	serialPort[0]->flush();
	serialPort[0]->setTimeout(timeout);
	if(!serialPort[0]->find(wifiConfBuf) || !serialPort[0]->find(at_ok)) {
		INFO1("Fail to set wifi conf");
		goto end;
	}
	
	ret = true;		
end:	
	return ret;
}
开发者ID:chunlinhan,项目名称:WiFiRM04,代码行数:29,代码来源:at_drv.cpp


示例2: INFO1

void AtDrv::getFwVersion(char fwVersion[], uint8_t bufLength, long timeout)
{
	int bytes;

	if(!isAtMode()) {
		if(!switchToAtMode()) {
			INFO1("Can't switch to at mode");
			goto end;
		}
	}

	clearSerialRxData();
	INFO1(at_ver);
	serialPort[0]->print(at_ver);
	serialPort[0]->flush();
	serialPort[0]->setTimeout(timeout);

	// skip cmd response and '\n'
	if(!serialPort[0]->find(at_ver) || !serialPort[0]->find("\n")) {
		INFO1("fail to get firmware version");
		goto end;
	}
	
	bytes = serialPort[0]->readBytesUntil('\r', fwVersion, bufLength);
	fwVersion[bytes] = NULL;

end:
	clearSerialRxData();
	return;
}
开发者ID:chunlinhan,项目名称:WiFiRM04,代码行数:30,代码来源:at_drv.cpp


示例3: format_get_plugin

int format_get_plugin (format_plugin_t *plugin)
{
    int ret = -1;

    if (plugin->_state)
    {
        INFO1 ("internal format details already created for %s", plugin->mount);
        return 0;
    }
    switch (plugin->type)
    {
        case FORMAT_TYPE_OGG:
            ret = format_ogg_get_plugin (plugin);
            break;
        case FORMAT_TYPE_AAC:
        case FORMAT_TYPE_MPEG:
            ret = format_mp3_get_plugin (plugin);
            break;
        case FORMAT_TYPE_EBML:
            ret = format_ebml_get_plugin (plugin);
            break;
        default:
            INFO1 ("unparsed format detected for %s", plugin->mount);
            break;
    }

    return ret;
}
开发者ID:niko,项目名称:icecast-kh,代码行数:28,代码来源:format.c


示例4: clearSerialRxData

void AtDrv::getLocalIp(uint8_t *ip, long timeout)
{
	clearSerialRxData();
	INFO1(at_get_ip);
	serialPort[0]->print(at_get_ip);
	serialPort[0]->print("\r\r");
	serialPort[0]->flush();
	serialPort[0]->setTimeout(timeout);
	
	// skip cmd response
	if(!serialPort[0]->find(at_get_ip)) {
		INFO1("fail to get local IP");
		ip[0] = ip[1] = ip[2] = ip[3] = 0;
		goto end;
	}

	ip[0] = serialPort[0]->parseInt();
	ip[1] = serialPort[0]->parseInt();
	ip[2] = serialPort[0]->parseInt();
	ip[3] = serialPort[0]->parseInt();
	
	INFO("Local IP: %d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
	
end:
	clearSerialRxData();
	return;	
}
开发者ID:chunlinhan,项目名称:WiFiRM04,代码行数:27,代码来源:at_drv.cpp


示例5: slave

/** Receiver function  */
int slave(int argc, char *argv[])
{
  m_task_t task = NULL;
  int res;
  int id = -1;

  xbt_assert1(sscanf(argv[1],"%d", &id),
	 "Invalid argument %s\n",argv[1]);

  MSG_process_sleep(1); /* Make sure the master is done creating the mailboxes */
   
  while(1) {
    res = MSG_mailbox_get_task_ext(mb[id], &(task), NULL, -1);
    xbt_assert0(res == MSG_OK, "MSG_task_get failed");

    INFO1("Received \"%s\"", MSG_task_get_name(task));
    if (!strcmp(MSG_task_get_name(task),"finalize")) {
	MSG_task_destroy(task);
	break;
    }
     
    INFO1("Processing \"%s\"", MSG_task_get_name(task));
    MSG_task_execute(task);
    INFO1("\"%s\" done", MSG_task_get_name(task));
    MSG_task_destroy(task);
    task = NULL;
  }
  INFO0("I'm done. See you!");
  return 0;
} /* end_of_slave */
开发者ID:hadj,项目名称:simgrid-scalability-XPs,代码行数:31,代码来源:masterslave_mailbox_opt.c


示例6: _handle_source_request

/* only called for native icecast source clients */
static void _handle_source_request (client_t *client, const char *uri)
{
    INFO1("Source logging in at mountpoint \"%s\"", uri);

    if (uri[0] != '/')
    {
        WARN0 ("source mountpoint not starting with /");
        client_send_401 (client);
        return;
    }
    switch (client_check_source_auth (client, uri))
    {
        case 0: /* authenticated from config file */
            source_startup (client, uri, ICECAST_SOURCE_AUTH);
            break;

        case 1: /* auth pending */
            break;

        default: /* failed */
            INFO1("Source (%s) attempted to login with invalid or missing password", uri);
            client_send_401(client);
            break;
    }
}
开发者ID:miksago,项目名称:icecast,代码行数:26,代码来源:connection.c


示例7: _handle_source_request

static void _handle_source_request (client_t *client, char *uri, int auth_style)
{
    source_t *source;

    INFO1("Source logging in at mountpoint \"%s\"", uri);

    if (uri[0] != '/')
    {
        WARN0 ("source mountpoint not starting with /");
        client_send_401 (client);
        return;
    }
    if (auth_style == ICECAST_SOURCE_AUTH) {
        if (connection_check_source_pass (client->parser, uri) == 0)
        {
            /* We commonly get this if the source client is using the wrong
             * protocol: attempt to diagnose this and return an error
             */
            /* TODO: Do what the above comment says */
            INFO1("Source (%s) attempted to login with invalid or missing password", uri);
            client_send_401(client);
            return;
        }
    }
    source = source_reserve (uri);
    if (source)
    {
        if (auth_style == SHOUTCAST_SOURCE_AUTH) {
            source->shoutcast_compat = 1;
        }
        source->client = client;
        source->parser = client->parser;
        source->con = client->con;
        if (connection_complete_source (source, 1) < 0)
        {
            source_clear_source (source);
            source_free_source (source);
        }
        else
        {
            refbuf_t *ok = refbuf_new (PER_CLIENT_REFBUF_SIZE);
            client->respcode = 200;
            snprintf (ok->data, PER_CLIENT_REFBUF_SIZE,
                    "HTTP/1.0 200 OK\r\n\r\n");
            ok->len = strlen (ok->data);
            /* we may have unprocessed data read in, so don't overwrite it */
            ok->associated = client->refbuf;
            client->refbuf = ok;
            fserve_add_client_callback (client, source_client_callback, source);
        }
    }
    else
    {
        client_send_404 (client, "Mountpoint in use");
        WARN1 ("Mountpoint %s in use", uri);
    }
}
开发者ID:kitsune-dsu,项目名称:kitsune-icecast,代码行数:57,代码来源:connection.c


示例8: auth_new_listener

/* wrapper function for auth thread to authenticate new listener
 * connection details
 */
static void auth_new_listener (auth_t *auth, 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 (is_listener_connected (client) == 0)
    {
        DEBUG0 ("listener is no longer connected");
        client->respcode = 400;
        auth_release (client->auth);
        client->auth = NULL;
        return;
    }
    if (auth->authenticate)
    {
        if (auth->authenticate (auth_user) != AUTH_OK)
        {
            auth_release (client->auth);
            client->auth = NULL;
            return;
        }
    }
    if (auth_postprocess_listener (auth_user) < 0)
    {
        auth_release (client->auth);
        client->auth = NULL;
        INFO1 ("client %lu failed", client->con->id);
    }
}
开发者ID:9060,项目名称:icecast-uo-aga,代码行数:33,代码来源:auth.c


示例9: _sig_die

void _sig_die(int signo)
{
    INFO1("Caught signal %d, shutting down...", signo);

    /* inform the server to start shutting down */
    global.running = ICE_HALTING;
}
开发者ID:9060,项目名称:icecast-uo-aga,代码行数:7,代码来源:sighandler.c


示例10: _handle_source_request

static void _handle_source_request(connection_t *con, 
        http_parser_t *parser, char *uri)
{
    client_t *client;
    source_t *source;

    client = client_create(con, parser);

    INFO1("Source logging in at mountpoint \"%s\"", uri);
                
    if (uri[0] != '/')
    {
        WARN0 ("source mountpoint not starting with /");
        client_send_401 (client);
        return;
    }

    if (!connection_check_source_pass(parser, uri)) {
        /* We commonly get this if the source client is using the wrong
         * protocol: attempt to diagnose this and return an error
         */
        /* TODO: Do what the above comment says */
        INFO1("Source (%s) attempted to login with invalid or missing password", uri);
        client_send_401(client);
        return;
    }
    source = source_reserve (uri);
    if (source)
    {
        source->client = client;
        source->parser = parser;
        source->con = con;
        if (connection_complete_source (source) < 0)
        {
            source->client = NULL;
            source_free_source (source);
        }
        else
            thread_create ("Source Thread", source_client_thread,
                    source, THREAD_DETACHED);
    }
    else
    {
        client_send_404 (client, "Mountpoint in use");
        WARN1 ("Mountpoint %s in use", uri);
    }
}
开发者ID:miksago,项目名称:icecast,代码行数:47,代码来源:connection.c


示例11: get_ssl_certificate

static void get_ssl_certificate (ice_config_t *config)
{
    SSL_METHOD *method;
    long ssl_opts;
    ssl_ok = 0;

    SSL_load_error_strings();                /* readable error messages */
    SSL_library_init();                      /* initialize library */

    method = SSLv23_server_method();
    ssl_ctx = SSL_CTX_new (method);
    ssl_opts = SSL_CTX_get_options (ssl_ctx);
    SSL_CTX_set_options (ssl_ctx, ssl_opts|SSL_OP_NO_SSLv2);

    do
    {
        if (config->cert_file == NULL)
            break;
        if (SSL_CTX_use_certificate_chain_file (ssl_ctx, config->cert_file) <= 0)
        {
            WARN1 ("Invalid cert file %s", config->cert_file);
            break;
        }
        if (SSL_CTX_use_PrivateKey_file (ssl_ctx, config->cert_file, SSL_FILETYPE_PEM) <= 0)
        {
            WARN1 ("Invalid private key file %s", config->cert_file);
            break;
        }
        if (!SSL_CTX_check_private_key (ssl_ctx))
        {
            ERROR1 ("Invalid %s - Private key does not match cert public key", config->cert_file);
            break;
        }
        if (SSL_CTX_set_cipher_list(ssl_ctx, config->cipher_list) <= 0) 
        { 
            WARN1 ("Invalid cipher list: %s", config->cipher_list); 
        } 
        ssl_ok = 1;
        INFO1 ("SSL certificate found at %s", config->cert_file);
        INFO1 ("SSL using ciphers %s", config->cipher_list); 
        return;
    } while (0);
    INFO0 ("No SSL capability on any configured ports");
}
开发者ID:miksago,项目名称:icecast,代码行数:44,代码来源:connection.c


示例12: workers_adjust

void workers_adjust (int new_count)
{
    INFO1 ("requested worker count %d", new_count);
    while (worker_count != new_count)
    {
        if (worker_count < new_count)
            worker_start ();
        else if (worker_count > new_count)
            worker_stop ();
    }
}
开发者ID:Johnny-Cache,项目名称:icecast-kh,代码行数:11,代码来源:client.c


示例13: sr

FDWEpollBackend::FDWEpollBackend(int nfds_)
:FDWBackend(nfds_), sr(0)
{
	if ((epfd = epoll_create(nfds)) < 0)
		throw InitError("failed to open epoll device");
	epevents.reset(new struct epoll_event[nfds]);

	std::memset(epevents.get(), 0, sizeof(struct epoll_event) * nfds);

	INFO1("fdwatch epoll() based layer initialized (max %d sockets)", nfds);
}
开发者ID:DizKragnet,项目名称:pvpgn,代码行数:11,代码来源:fdwatch_epoll.cpp


示例14: admin_handle_general_request

static int admin_handle_general_request (client_t *client, const char *uri)
{
    struct admin_command *cmd;

    if ((client->flags & CLIENT_AUTHENTICATED) == 0)
    {
        INFO1("Bad or missing password on admin command request (%s)", uri);
        return client_send_401 (client, NULL);
    }

    cmd = find_admin_command (admin_general, uri);
    if (cmd == NULL)
    {
        INFO1 ("processing file %s", uri);
        return command_stats (client, uri);
    }
    if (cmd->handle.general == NULL)
        return client_send_400 (client, "unknown request");
    return cmd->handle.general (client, cmd->response);
}
开发者ID:MechanisM,项目名称:icecast-kh,代码行数:20,代码来源:admin.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ INFO2函数代码示例发布时间:2022-05-30
下一篇:
C++ INFO0函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap