コード例 #1
0
ファイル: map_mysql.c プロジェクト: mailhonor/libzc
static int _query(ZMAP * zm, char *query, char *value, int value_len, int timeout)
{
	int ret;
	ret = ___query(zm, query, value, value_len, timeout);
	if (zm->release_sec > 0) {
		ztimer_set(&(zm->release_timer), ___release, zm, zm->release_sec * 1000);
	}

	return ret;
}
コード例 #2
0
ファイル: factory.cpp プロジェクト: z80/IPM
::Ice::DispatchStatus
Factory::DeviceFactory::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
    ::std::pair< ::std::string*, ::std::string*> r = ::std::equal_range(__Factory__DeviceFactory_all, __Factory__DeviceFactory_all + 6, current.operation);
    if(r.first == r.second)
    {
        throw Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
    }

    switch(r.first - __Factory__DeviceFactory_all)
    {
        case 0:
        {
            return ___ice_id(in, current);
        }
        case 1:
        {
            return ___ice_ids(in, current);
        }
        case 2:
        {
            return ___ice_isA(in, current);
        }
        case 3:
        {
            return ___ice_ping(in, current);
        }
        case 4:
        {
            return ___interfaces(in, current);
        }
        case 5:
        {
            return ___query(in, current);
        }
    }

    assert(false);
    throw Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}