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


C++ LogDebug函数代码示例

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


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

示例1: PROFILE

AssetLoadState OgreMeshAsset::DeserializeFromData(const u8 *data_, size_t numBytes)
{
    PROFILE(OgreMeshAsset_LoadFromFileInMemory);
    assert(data_);
    if (!data_)
        return ASSET_LOAD_FAILED;
    
    // Force an unload of this data first.
    Unload();

    if (OGRE_THREAD_SUPPORT != 0)
    {
        // We can only do threaded loading from disk, and not any disk location but only from asset cache.
        // local:// refs will return empty string here and those will fall back to the non-threaded loading.
        // Do not change this to do DiskCache() as that directory for local:// refs will not be a known resource location for ogre.
        QString cacheDiskSource = assetAPI->GetAssetCache()->GetDiskSource(QUrl(Name()));
        if (!cacheDiskSource.isEmpty())
        {
            QFileInfo fileInfo(cacheDiskSource);
            std::string sanitatedAssetRef = fileInfo.fileName().toStdString(); 
            loadTicket_ = Ogre::ResourceBackgroundQueue::getSingleton().load(Ogre::MeshManager::getSingleton().getResourceType(),
                                                                             sanitatedAssetRef, OgreRenderer::OgreRenderingModule::CACHE_RESOURCE_GROUP,
                                                                             false, 0, 0, this);
            return ASSET_LOAD_PROCESSING;
        }
    }

    if (ogreMesh.isNull())
    {   
        ogreMesh = Ogre::MeshManager::getSingleton().createManual(
            OgreRenderer::SanitateAssetIdForOgre(this->Name().toStdString()), Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
        if (ogreMesh.isNull())
        {
            LogError("Failed to create mesh " + Name().toStdString());
            return ASSET_LOAD_FAILED; 
        }
        ogreMesh->setAutoBuildEdgeLists(false);
    }

    std::vector<u8> tempData(data_, data_ + numBytes);
#include "DisableMemoryLeakCheck.h"
    Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream((void*)&tempData[0], numBytes, false));
#include "EnableMemoryLeakCheck.h"
    Ogre::MeshSerializer serializer;
    serializer.importMesh(stream, ogreMesh.getPointer()); // Note: importMesh *adds* submeshes to an existing mesh. It doesn't replace old ones.
    
    // Generate tangents to mesh
    try
    {
        unsigned short src, dest;
        ///\bug Crashes if called for a mesh that has null or zero vertices in the vertex buffer, or null or zero indices in the index buffer.
        if (!ogreMesh->suggestTangentVectorBuildParams(Ogre::VES_TANGENT, src, dest))
            ogreMesh->buildTangentVectors(Ogre::VES_TANGENT, src, dest);
    }
    catch (...) {}
    
    // Generate extremity points to submeshes, 1 should be enough
    try
    {
        for(uint i = 0; i < ogreMesh->getNumSubMeshes(); ++i)
        {
            Ogre::SubMesh *smesh = ogreMesh->getSubMesh(i);
            if (smesh)
                smesh->generateExtremes(1);
        }
    }
    catch (...) {}
        
    try
    {
        // Assign default materials that won't complain
        SetDefaultMaterial();
        // Set asset references the mesh has
        //ResetReferences();
    }
    catch (Ogre::Exception &e)
    {
        LogError("Failed to create mesh " + this->Name().toStdString() + ": " + std::string(e.what()));
        Unload();
        return ASSET_LOAD_FAILED;
    }

    //internal_name_ = SanitateAssetIdForOgre(id_);
    
    LogDebug("Ogre mesh " + this->Name().toStdString() + " created");
    return ASSET_LOAD_SUCCESFULL;
}
开发者ID:jarmovh,项目名称:naali,代码行数:87,代码来源:OgreMeshAsset.cpp

示例2: Remove_Client

static bool
Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const char *Reason, bool InformServer )
{
	CL2CHAN *cl2chan, *last_cl2chan;
	CHANNEL *c;

	assert( Chan != NULL );
	assert( Client != NULL );
	assert( Origin != NULL );
	assert( Reason != NULL );

	/* Do not inform other servers if the channel is local to this server,
	 * regardless of what the caller requested! */
	if(InformServer)
		InformServer = !Channel_IsLocal(Chan);

	last_cl2chan = NULL;
	cl2chan = My_Cl2Chan;
	while( cl2chan )
	{
		if(( cl2chan->channel == Chan ) && ( cl2chan->client == Client )) break;
		last_cl2chan = cl2chan;
		cl2chan = cl2chan->next;
	}
	if( ! cl2chan ) return false;

	c = cl2chan->channel;
	assert( c != NULL );

	/* maintain cl2chan list */
	if( last_cl2chan ) last_cl2chan->next = cl2chan->next;
	else My_Cl2Chan = cl2chan->next;
	free( cl2chan );

	switch( Type )
	{
		case REMOVE_QUIT:
			/* QUIT: other servers have already been notified, 
			 * see Client_Destroy(); so only inform other clients
			 * in same channel. */
			assert( InformServer == false );
			LogDebug("User \"%s\" left channel \"%s\" (%s).",
					Client_Mask( Client ), c->name, Reason );
			break;
		case REMOVE_KICK:
			/* User was KICKed: inform other servers (public
			 * channels) and all users in the channel */
			if( InformServer )
				IRC_WriteStrServersPrefix( Client_NextHop( Origin ),
					Origin, "KICK %s %s :%s", c->name, Client_ID( Client ), Reason);
			IRC_WriteStrChannelPrefix(Client, c, Origin, false, "KICK %s %s :%s",
							c->name, Client_ID( Client ), Reason );
			if ((Client_Conn(Client) > NONE) &&
					(Client_Type(Client) == CLIENT_USER))
			{
				IRC_WriteStrClientPrefix(Client, Origin, "KICK %s %s :%s",
								c->name, Client_ID( Client ), Reason);
			}
			LogDebug("User \"%s\" has been kicked off \"%s\" by \"%s\": %s.",
				Client_Mask( Client ), c->name, Client_ID(Origin), Reason);
			break;
		default: /* PART */
			if (Conf_MorePrivacy)
				Reason = "";

			if (InformServer)
				IRC_WriteStrServersPrefix(Origin, Client, "PART %s :%s", c->name, Reason);

			IRC_WriteStrChannelPrefix(Origin, c, Client, false, "PART %s :%s",
									c->name, Reason);

			if ((Client_Conn(Origin) > NONE) &&
					(Client_Type(Origin) == CLIENT_USER))
			{
				IRC_WriteStrClientPrefix( Origin, Client, "PART %s :%s", c->name, Reason);
				LogDebug("User \"%s\" left channel \"%s\" (%s).",
					Client_Mask(Client), c->name, Reason);
			}
	}

	/* When channel is empty and is not pre-defined, delete */
	if( ! Channel_HasMode( Chan, 'P' ))
	{
		if( ! Get_First_Cl2Chan( NULL, Chan )) Delete_Channel( Chan );
	}

	return true;
} /* Remove_Client */
开发者ID:majestrate,项目名称:ngIRCd,代码行数:88,代码来源:channel.c

示例3: _9p_setattr

int _9p_setattr( _9p_request_data_t * preq9p, 
                  void  * pworker_data,
                  u32 * plenout, 
                  char * preply)
{
  char * cursor = preq9p->_9pmsg + _9P_HDR_SIZE + _9P_TYPE_SIZE ;
  nfs_worker_data_t * pwkrdata = (nfs_worker_data_t *)pworker_data ;

  u16  * msgtag     = NULL ;
  u32  * fid        = NULL ;
  u32  * valid      = NULL ;
  u32  * mode       = NULL ;
  u32  * uid        = NULL ;
  u32  * gid        = NULL ;
  u64  * size       = NULL ;
  u64  * atime_sec  = NULL ;
  u64  * atime_nsec = NULL ;
  u64  * mtime_sec  = NULL ;
  u64  * mtime_nsec = NULL ;

  _9p_fid_t * pfid = NULL ;

  fsal_attrib_list_t    fsalattr ;
  cache_inode_status_t  cache_status ;

  struct timeval t;

  int rc = 0 ; 
  int err = 0 ;

  if ( !preq9p || !pworker_data || !plenout || !preply )
   return -1 ;

  /* Get data */
  _9p_getptr( cursor, msgtag, u16 ) ; 

  _9p_getptr( cursor, fid,        u32 ) ; 
  _9p_getptr( cursor, valid,      u32 ) ;
  _9p_getptr( cursor, mode,       u32 ) ;
  _9p_getptr( cursor, uid,        u32 ) ;
  _9p_getptr( cursor, gid,        u32 ) ;
  _9p_getptr( cursor, size,       u64 ) ;
  _9p_getptr( cursor, atime_sec,  u64 ) ;
  _9p_getptr( cursor, atime_nsec, u64 ) ;
  _9p_getptr( cursor, mtime_sec,  u64 ) ;
  _9p_getptr( cursor, mtime_nsec, u64 ) ;

  LogDebug( COMPONENT_9P, "TSETATTR: tag=%u fid=%u mode=0%o uid=%u gid=%u size=%llu atime=(%llu|%llu) mtime=(%llu|%llu)",
            (u32)*msgtag, *fid, *mode, *uid, *gid, *size,  (unsigned long long)*atime_sec, (unsigned long long)*atime_nsec, 
            (unsigned long long)*mtime_sec, (unsigned long long)*mtime_nsec  ) ;

  if( *fid >= _9P_FID_PER_CONN )
    {
      err = ERANGE ;
      rc = _9p_rerror( preq9p, msgtag, &err, plenout, preply ) ;
      return rc ;
    }

  pfid = &preq9p->pconn->fids[*fid] ;

  /* If a "time" change is required, but not with the "_set" suffix, use gettimeofday */
  if( *valid & (_9P_SETATTR_ATIME|_9P_SETATTR_CTIME|_9P_SETATTR_MTIME) )
   {
     if( gettimeofday( &t, NULL ) == -1 )
       {
         LogMajor( COMPONENT_9P, "TSETATTR: tag=%u fid=%u ERROR !! gettimeofday returned -1 with errno=%u",
                   (u32)*msgtag, *fid, errno ) ;

         err = errno ;
         rc = _9p_rerror( preq9p, msgtag, &err, plenout, preply ) ;
         return rc ;
       }
   }

  /* Let's do the job */
  memset( (char *)&fsalattr, 0, sizeof( fsalattr ) ) ;
  if( *valid & _9P_SETATTR_MODE )
   {
      fsalattr.asked_attributes |= FSAL_ATTR_MODE ;
      fsalattr.mode = *mode ;
   }

  if( *valid & _9P_SETATTR_UID )
   {
      fsalattr.asked_attributes |= FSAL_ATTR_OWNER ;
      fsalattr.owner = *uid ;
   }

  if( *valid & _9P_SETATTR_GID )
   {
      fsalattr.asked_attributes |= FSAL_ATTR_GROUP ;
      fsalattr.group = *gid ;
   }

  if( *valid & _9P_SETATTR_SIZE )
   {
      fsalattr.asked_attributes |= FSAL_ATTR_SIZE ;
      fsalattr.filesize = *size ;
   }

//.........这里部分代码省略.........
开发者ID:bwelch,项目名称:nfs-ganesha,代码行数:101,代码来源:9p_setattr.c

示例4: lock

void CDeMultiplexer::FillAudio(CTsHeader& header, byte* tsPacket)
{
  //LogDebug("FillAudio - audio PID %d", m_audioPid );

  if (m_iAudioStream < 0 || m_iAudioStream >= m_audioStreams.size()) return;

  m_audioPid = m_audioStreams[m_iAudioStream].pid;
  if (m_audioPid == 0 || m_audioPid != header.Pid) return;
  if (header.AdaptionFieldOnly()) return;

  bool packetProcessed = false;

  CAutoLock lock (&m_sectionAudio);
  if (header.PayloadUnitStart)
  {
    byte* p = tsPacket + header.PayLoadStart;
    if ((p[0] == 0) && (p[1] == 0) && (p[2] == 1))
    {
      CPcr pts;
      CPcr dts;

      if (m_pCurrentAudioBuffer)
      {
        delete m_pCurrentAudioBuffer;
        m_pCurrentAudioBuffer = NULL;
      }

      m_pCurrentAudioBuffer = new Packet();

      if (CPcr::DecodeFromPesHeader(p, 0, pts, dts))
      {
#ifdef LOG_DEMUXER_AUDIO_SAMPLES
        LogDebug("demux: aud pts: %6.3f clip: %d playlist: %d", pts.ToClock(), m_nClip, m_nPlaylist);
#endif
        m_bAC3Substream = false;

        m_pCurrentAudioBuffer->rtStart = pts.IsValid ? CONVERT_90KHz_DS(pts.PcrReferenceBase) : Packet::INVALID_TIME;
        
        WAVEFORMATEX* wfe = (WAVEFORMATEX*)m_audioParser->pmt.pbFormat;
        if (wfe)
        {
          REFERENCE_TIME duration = (wfe->nBlockAlign * 10000000) / wfe->nAvgBytesPerSec;
          m_pCurrentAudioBuffer->rtStop = m_pCurrentAudioBuffer->rtStart + duration;
        }
        else
          m_pCurrentAudioBuffer->rtStop = m_pCurrentAudioBuffer->rtStart + 1;  

        m_pCurrentAudioBuffer->nClipNumber = m_nClip;
        m_pCurrentAudioBuffer->nPlaylist = m_nPlaylist;
        m_pCurrentAudioBuffer->rtTitleDuration = m_rtTitleDuration;

        UINT32 pesHeaderLen = p[8] + 9;
        m_nAudioPesLenght = (p[4] << 8) + p[5] - (pesHeaderLen - 6);

        unsigned int flags = p[7];
        const BYTE* pos = p + 9;

        if ((flags & 0xc0) == 0x80) 
          pos += 5; // PTS
        else if ((flags & 0xc0) == 0xc0) 
          pos += 10; // PTS & DTS

        if (flags & 0x01) // PES extension
        {
          unsigned int pes_ext = *pos++;
          // Skip PES private data, program packet sequence counter and P-STD buffer
          unsigned int skip = (pes_ext >> 4) & 0xb;
          skip += skip & 0x9;
          pos += skip;
          
          if ((pes_ext & 0x41) == 0x01 && (pos + 2) <= (p + pesHeaderLen)) 
          {  
            // PES extension 2
            if ((pos[0] & 0x7f) > 0 && (pos[1] & 0x80) == 0)
            {
              if (pos[1] == 0x76)
                m_bAC3Substream = true; // this stream will get discarded
            }
          }
        }
开发者ID:Azzuro,项目名称:MediaPortal-1,代码行数:80,代码来源:DeMultiplexer.cpp

示例5: file_attributes_to_xattr_attrs

static int file_attributes_to_xattr_attrs(fsal_attrib_list_t * file_attrs,
                                          fsal_attrib_list_t * p_xattr_attrs,
                                          unsigned int attr_index)
{

  /* supported attributes are:
   * - owner (same as the objet)
   * - group (same as the objet)
   * - type FSAL_TYPE_XATTR
   * - fileid (attr index ? or (fileid^((index+1)<<24)) )
   * - mode (config & file)
   * - atime, mtime, ctime = these of the object ?
   * - size=1block, used=1block
   * - rdev=0
   * - nlink=1
   */
  fsal_attrib_mask_t supported = FSAL_ATTR_SUPPATTR | FSAL_ATTR_MODE | FSAL_ATTR_FILEID
      | FSAL_ATTR_TYPE | FSAL_ATTR_OWNER | FSAL_ATTR_GROUP
      | FSAL_ATTR_ATIME | FSAL_ATTR_MTIME | FSAL_ATTR_CTIME
      | FSAL_ATTR_CREATION | FSAL_ATTR_CHGTIME | FSAL_ATTR_SIZE
      | FSAL_ATTR_SPACEUSED | FSAL_ATTR_NUMLINKS | FSAL_ATTR_RAWDEV | FSAL_ATTR_FSID;
  fsal_attrib_mask_t unsupp;

  /* only those supported by filesystem */
  supported &= global_fs_info.supported_attrs;

  if(p_xattr_attrs->asked_attributes == 0)
    {
      p_xattr_attrs->asked_attributes = supported;

      LogCrit(COMPONENT_FSAL,
              "Error: p_xattr_attrs->asked_attributes was 0 in %s() line %d, file %s",
              __FUNCTION__, __LINE__, __FILE__);
    }

  unsupp = p_xattr_attrs->asked_attributes & (~supported);

  if(unsupp)
    {
      LogDebug(COMPONENT_FSAL,
               "Asking for unsupported attributes in %s(): %#llX removing it from asked attributes",
               __FUNCTION__, unsupp);

      p_xattr_attrs->asked_attributes &= (~unsupp);
    }

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_SUPPATTR)
    p_xattr_attrs->supported_attributes = supported;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_MODE)
    {
      p_xattr_attrs->mode = file_attrs->mode & global_fs_info.xattr_access_rights;
      if(xattr_list[attr_index].flags & XATTR_RO)
        p_xattr_attrs->mode &= ~(0222);
    }

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_FILEID)
    {
      unsigned int i;
      unsigned long hash = attr_index + 1;
      char *str = (char *)&file_attrs->fileid;

      for(i = 0; i < sizeof(p_xattr_attrs->fileid); i++, str++)
        {
          hash = (hash << 5) - hash + (unsigned long)(*str);
        }
      p_xattr_attrs->fileid = hash;
    }

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_TYPE)
    p_xattr_attrs->type = FSAL_TYPE_XATTR;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_OWNER)
    p_xattr_attrs->owner = file_attrs->owner;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_GROUP)
    p_xattr_attrs->group = file_attrs->group;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_ATIME)
    p_xattr_attrs->atime = file_attrs->atime;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_MTIME)
    p_xattr_attrs->mtime = file_attrs->mtime;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_CTIME)
    p_xattr_attrs->ctime = file_attrs->ctime;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_CREATION)
    p_xattr_attrs->creation = file_attrs->creation;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_CHGTIME)
    p_xattr_attrs->chgtime = file_attrs->chgtime;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_SIZE)
    p_xattr_attrs->filesize = DEV_BSIZE;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_SPACEUSED)
    p_xattr_attrs->spaceused = DEV_BSIZE;

  if(p_xattr_attrs->asked_attributes & FSAL_ATTR_NUMLINKS)
//.........这里部分代码省略.........
开发者ID:chandra2,项目名称:nfs-ganesha,代码行数:101,代码来源:fsal_xattrs.c

示例6: FreeXprt

/*
 * Duplicate xprt from original to copy.
 */
SVCXPRT *Svcxprt_copy(SVCXPRT *xprt_copy, SVCXPRT *xprt_orig)
{
  if(xprt_copy)
    FreeXprt(xprt_copy);

  xprt_copy = (SVCXPRT *) Mem_Alloc(sizeof(SVCXPRT));
  if(xprt_copy == NULL)
    goto fail_no_xprt;

  LogFullDebug(COMPONENT_RPC,
               "Svcxprt_copy copying xprt_orig=%p to xprt_copy=%p",
               xprt_orig, xprt_copy);
  memcpy(xprt_copy, xprt_orig, sizeof(SVCXPRT));
  xprt_copy->xp_p1 = NULL;
  xprt_copy->xp_p2 = NULL;

  if(xprt_orig->xp_ops == &Svcudp_op)
    {
      if(Su_data(xprt_orig))
        {
          struct Svcudp_data *su_o = Su_data(xprt_orig), *su_c;
          su_c = (struct Svcudp_data *) Mem_Alloc(sizeof(*su_c));
          if(!su_c)
            goto fail;
          Su_data_set(xprt_copy) = (void *) su_c;
          memcpy(su_c, su_o, sizeof(*su_c));

          rpc_buffer(xprt_copy) = Mem_Alloc_Label(su_c->su_iosz, "UDP IO Buffer");
          if(!rpc_buffer(xprt_copy))
            goto fail;
          xdrmem_create(&(su_c->su_xdrs), rpc_buffer(xprt_copy), su_c->su_iosz, XDR_DECODE);
          if(xprt_orig->xp_verf.oa_base == su_o->su_verfbody)
            xprt_copy->xp_verf.oa_base = su_c->su_verfbody;
          else
            xprt_copy->xp_verf.oa_base = xprt_orig->xp_verf.oa_base;
          xprt_copy->xp_verf.oa_flavor = xprt_orig->xp_verf.oa_flavor;
          xprt_copy->xp_verf.oa_length = xprt_orig->xp_verf.oa_length;
        }
      else
        goto fail;
    }
  else if (xprt_orig->xp_ops == &Svctcp_op)
    {
      struct tcp_conn *cd_o = (struct tcp_conn *)xprt_orig->xp_p1, *cd_c;
      cd_c = (struct tcp_conn *) Mem_Alloc(sizeof(*cd_c));
      if(!cd_c)
        goto fail;
      memcpy(cd_c, cd_o, sizeof(*cd_c));
      xprt_copy->xp_p1 = (void *) cd_c;
      xdrrec_create(&(cd_c->xdrs), 32768, 32768, (caddr_t) xprt_copy, Readtcp, Writetcp);
      if(xprt_orig->xp_verf.oa_base == cd_o->verf_body)
        xprt_copy->xp_verf.oa_base = cd_c->verf_body;
      else
        xprt_copy->xp_verf.oa_base = xprt_orig->xp_verf.oa_base;
      xprt_copy->xp_verf.oa_flavor = xprt_orig->xp_verf.oa_flavor;
      xprt_copy->xp_verf.oa_length = xprt_orig->xp_verf.oa_length;
    }
  else if (xprt_orig->xp_ops == &Svctcp_rendezvous_op)
    {
      goto fail;
    }
  else
    {
      LogDebug(COMPONENT_RPC,
               "Attempt to copy unknown xprt %p",
               xprt_orig);
      Mem_Free(xprt_copy);
      goto fail_no_xprt;
    }

  return xprt_copy;

 fail:
  FreeXprt(xprt_copy);
 fail_no_xprt:
  /* Let caller know about failure */
  LogCrit(COMPONENT_RPC,
          "Failed to copy xprt");
  svcerr_systemerr(xprt_orig);
  return NULL;
}
开发者ID:MeghanaM,项目名称:nfs-ganesha,代码行数:84,代码来源:Svc_tcp_oncrpc.c

示例7: while

//FIXME: this older code version is only for backward compatibility with dependent classes.
//       proper fix is to change code of all classes that depend on PidInfo2 in favour of CPidTable!
bool CPmtParser::DecodePmt(CSection sections, int& pcr_pid, bool& hasCaDescriptor, vector<PidInfo2>& pidInfos)
{
	byte* section=sections.Data;
	int sectionLen=sections.section_length;

	int table_id = sections.table_id;
	if (table_id!=2) return false;
	if (m_serviceId!=-1)
		if (sections.table_id_extension!=m_serviceId) return false;

	int section_syntax_indicator = (section[1]>>7) & 1;
	int section_length = ((section[1]& 0xF)<<8) + section[2];
	int program_number = (section[3]<<8)+section[4];
	int version_number = ((section[5]>>1)&0x1F);
	int current_next_indicator = section[5] & 1;
	int section_number = section[6];
	int last_section_number = section[7];
	pcr_pid=((section[8]& 0x1F)<<8)+section[9];
	int program_info_length = ((section[10] & 0xF)<<8)+section[11];
	int len2 = program_info_length;
	int pointer = 12;
	int len1 = section_length -( 9 + program_info_length +4);
	int x;
	
	// loop 1
	while (len2 > 0)
	{
		int indicator=section[pointer];
		if (indicator == 0x9)  // MPEG CA descriptor, implying the service is scrambled
		{
			hasCaDescriptor = true;
		}
		int descriptorLen=section[pointer+1];
		len2 -= (descriptorLen+2);
		pointer += (descriptorLen+2);
	}
	
	// loop 2
	int stream_type=0;
	int elementary_PID=0;
	int ES_info_length=0;
	int audioToSet=0;
	int subtitleToSet=0;

	pidInfos.clear();
	while (len1 > 0)
	{
		//if (start+pointer+4>=sectionLen+9) return ;
    int curSubtitle=-1;
		stream_type = section[pointer];
		elementary_PID = ((section[pointer+1]&0x1F)<<8)+section[pointer+2];
		ES_info_length = ((section[pointer+3] & 0xF)<<8)+section[pointer+4];

		if (pointer+ES_info_length>=sectionLen) 
		{
			LogDebug("pmt parser check 1");
			return false;
		}

		PidInfo2 pidInfo2;
		pidInfo2.fakePid=-1;
		pidInfo2.elementaryPid=elementary_PID;
		pidInfo2.streamType=stream_type;
    pidInfo2.rawDescriptorSize=ES_info_length;
    if (pidInfo2.streamType!=SERVICE_TYPE_DVB_SUBTITLES2)
      pidInfo2.logicalStreamType=stream_type;
    //ITV HD workaround
    if (pidInfo2.streamType==SERVICE_TYPE_DVB_SUBTITLES2 && program_number==10510)
    {
      if (pidInfo2.logicalStreamType==0xffffffff && pidInfo2.elementaryPid==0xd49)
      {
        pidInfo2.streamType=SERVICE_TYPE_VIDEO_H264;
        pidInfo2.logicalStreamType=SERVICE_TYPE_VIDEO_H264;
        LogDebug("DecodePmt: set ITV HD video stream to H.264");
      }
    }
    //end of workaround

	// Boundary check
    if(ES_info_length > sizeof(pidInfo2.rawDescriptorData)) 
    {
      LogDebug("pmt parser check 3");
      return false;
    }

    if (pidInfo2.streamType==SERVICE_TYPE_DVB_SUBTITLES2)
      pidInfo2.logicalStreamType=-1;
		memset(pidInfo2.rawDescriptorData,0xFF,ES_info_length);
		memcpy(pidInfo2.rawDescriptorData,&section[pointer+5],ES_info_length);

	  pointer += 5;
	  len1 -= 5;
	  len2 = ES_info_length;
		while (len2 > 0)
		{
			if (pointer+1>=sectionLen) 
			{
				LogDebug("pmt parser check2");
//.........这里部分代码省略.........
开发者ID:Datenschredder,项目名称:MediaPortal-1,代码行数:101,代码来源:PmtParser.cpp

示例8: nfs41_op_open


//.........这里部分代码省略.........
                                    ((fsal_buffdesc_t *) & arg_OPEN4.claim.open_claim4_u.
                                     file, &filename))) != CACHE_INODE_SUCCESS)
        {
          res_OPEN4.status = nfs4_Errno(cache_status);
          return res_OPEN4.status;
        }

      /* Check parent */
      pentry_parent = data->current_entry;

      /* Parent must be a directory */
      if((pentry_parent->internal_md.type != DIR_BEGINNING) &&
         (pentry_parent->internal_md.type != DIR_CONTINUE))
        {
          /* Parent object is not a directory... */
          if(pentry_parent->internal_md.type == SYMBOLIC_LINK)
            res_OPEN4.status = NFS4ERR_SYMLINK;
          else
            res_OPEN4.status = NFS4ERR_NOTDIR;

          return res_OPEN4.status;
        }

      /* What kind of open is it ? */
      LogFullDebug(COMPONENT_NFS_V4,
                   "     OPEN: Claim type = %d   Open Type = %d  Share Deny = %d   Share Access = %d ",
                   arg_OPEN4.claim.claim,
                   arg_OPEN4.openhow.opentype,
                   arg_OPEN4.share_deny,
                   arg_OPEN4.share_access);


      /* It this a known client id ? */
      LogDebug(COMPONENT_NFS_V4,
               "OPEN Client id = %llx",
               (long long unsigned int)arg_OPEN4.owner.clientid);

      /* Is this open_owner known ? */
      convert_nfs4_owner(&arg_OPEN4.owner, &owner_name);

      if(!nfs4_owner_Get_Pointer(&owner_name, &powner))
        {
          /* This open owner is not known yet, allocated and set up a new one */
          powner = create_nfs4_owner(data->pclient,
                                     &owner_name,
                                     &arg_OPEN4.owner,
                                     NULL,
                                     1); /* NFSv4.1 specific, initial seqid is 1 */

          if(powner == NULL)
            {
              res_OPEN4.status = NFS4ERR_SERVERFAULT;
              return res_OPEN4.status;
            }
        }

      /* Status of parent directory before the operation */
      if(cache_inode_getattr(pentry_parent,
                             &attr_parent,
                             data->ht,
                             data->pclient,
                             data->pcontext,
                             &cache_status) != CACHE_INODE_SUCCESS)
        {
          res_OPEN4.status = nfs4_Errno(cache_status);
          return res_OPEN4.status;
开发者ID:chandra2,项目名称:nfs-ganesha,代码行数:67,代码来源:nfs41_op_open.c

示例9: SendGameReadyMsg

// Sends ON GAME_READY msg to all IOs
void SendGameReadyMsg()
{
	LogDebug("SendGameReadyMsg");
	SendMsgToAllIO(SM_GAME_READY);
}
开发者ID:Drakesinger,项目名称:ArxLibertatis,代码行数:6,代码来源:Core.cpp

示例10: rLock

//
// OpenFile
//
// Opens the file ready for streaming
//
HRESULT FileReader::OpenFile()
{
  CAutoLockFR rLock (&m_accessLock);
	WCHAR *pFileName = NULL;
	DWORD Tmo=14 ;
  HANDLE hFileUnbuff = INVALID_HANDLE_VALUE;
  
  //Can be used to open files in random-access mode to workaround SMB caching problems
  DWORD accessModeFlags = (m_bUseRandomAccess ? FILE_FLAG_RANDOM_ACCESS : FILE_FLAG_SEQUENTIAL_SCAN);     
  
	// Is the file already opened
	if (m_hFile != INVALID_HANDLE_VALUE) 
  {
    LogDebug("FileReader::OpenFile() file already open");
		return NOERROR;
	}

	// Has a filename been set yet
	if (m_pFileName == NULL) 
  {
    LogDebug("FileReader::OpenFile() no filename");
		return ERROR_INVALID_NAME;
	}
	
  m_bIsStopping = false;

	pFileName = m_pFileName;

  //LogDebug("FileReader::OpenFile(), Filename: %ws.", pFileName);

	do
	{
	  if (m_bIsStopping)
	    return E_FAIL;
	    
	  if (m_bUseDummyWrites)  //enable SMB2/SMB3 file existence cache workaround
	  {
  		if ((wcsstr(pFileName, L".ts.tsbuffer") != NULL)) //timeshift file only
  		{  	  
    	  CString tempFileName = pFileName;
    	  
    	  int replCount = tempFileName.Replace(L".ts.tsbuffer", randomStrGen(12));
  
        if (replCount > 0)
        {
    	    //LogDebug("FileReader::OpenFile(), try to write dummy file to update SMB2 cache - %ws", tempFileName);
      		hFileUnbuff = ::CreateFileW(tempFileName,		// The filename
      							(DWORD) (GENERIC_READ | GENERIC_WRITE),				// File access
      							(DWORD) (FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE), // Share access
      							NULL,						            // Security
      							(DWORD) CREATE_ALWAYS,		  // Open flags
      							(DWORD) (FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE),	// More flags
      							NULL);						          // Template
      
      		if (hFileUnbuff != INVALID_HANDLE_VALUE)
      		{
      		  char tempData[16] = {0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF};
      		  DWORD bytesWritten;
            ::WriteFile(hFileUnbuff, tempData, 16, &bytesWritten, NULL);  
          	::CloseHandle(hFileUnbuff); //File is deleted on CloseHandle since FILE_FLAG_DELETE_ON_CLOSE was used
          	hFileUnbuff = INVALID_HANDLE_VALUE; // Invalidate the file
    	      //LogDebug("FileReader::OpenFile(), dummy file write %d bytes to %ws", bytesWritten, tempFileName);
      		}
      	}
      }
    }
    
		// do not try to open a tsbuffer file without SHARE_WRITE so skip this try if we have a buffer file
		if (wcsstr(pFileName, L".ts.tsbuffer") == NULL)   // not tsbuffer files
		{
			// Try to open the file in read-only mode (should fail for 'live' recordings)
			m_hFile = ::CreateFileW(pFileName,      // The filename
						 (DWORD) GENERIC_READ,        // File access
						 (DWORD) FILE_SHARE_READ,     // Share access
						 NULL,                        // Security
						 (DWORD) OPEN_EXISTING,       // Open flags
						 (DWORD) accessModeFlags,     // More flags
						 NULL);                       // Template
			if (m_hFile != INVALID_HANDLE_VALUE) break ;
			  
  		//This is in case file is being recorded to ('live' recordings)
  		m_hFile = ::CreateFileW(pFileName,		// The filename
  							(DWORD) GENERIC_READ,				// File access
  							(DWORD) (FILE_SHARE_READ | FILE_SHARE_WRITE), // Share access
  							NULL,						            // Security
  							(DWORD) OPEN_EXISTING,		  // Open flags
  							(DWORD) accessModeFlags,	                // More flags
  							NULL);						          // Template 
  		if (m_hFile != INVALID_HANDLE_VALUE) break ;
		}
    else  //for tsbuffer files
    {
  		//This is in case file is being recorded to
  		m_hFile = ::CreateFileW(pFileName,		// The filename
  							(DWORD) GENERIC_READ,				// File access
//.........这里部分代码省略.........
开发者ID:Azzuro,项目名称:MediaPortal-1,代码行数:101,代码来源:FileReader.cpp

示例11: main

int main(int argc, char **argv)
{
    QString appBundlePath;
    if (argc > 1)
        appBundlePath = QString::fromLocal8Bit(argv[1]);

    if (argc < 2 || appBundlePath.startsWith("-")) {
        qDebug() << "Usage: macdeployqt app-bundle [options]";
        qDebug() << "";
        qDebug() << "Options:";
        qDebug() << "   -verbose=<0-3>  : 0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug";
        qDebug() << "   -no-plugins     : Skip plugin deployment";
        qDebug() << "   -dmg            : Create a .dmg disk image";
        qDebug() << "   -no-strip       : Don't run 'strip' on the binaries";
        qDebug() << "   -use-debug-libs : Deploy with debug versions of frameworks and plugins (implies -no-strip)";
        qDebug() << "";
        qDebug() << "macdeployqt takes an application bundle as input and makes it";
        qDebug() << "self-contained by copying in the Qt frameworks and plugins that";
        qDebug() << "the application uses.";
        qDebug() << "";
        qDebug() << "Plugins related to a framework are copied in with the";
        qDebug() << "framework. The accessibilty, image formats, and text codec";
        qDebug() << "plugins are always copied, unless \"-no-plugins\" is specified.";
        qDebug() << "";
        qDebug() << "See the \"Deploying an Application on Qt/Mac\" topic in the";
        qDebug() << "documentation for more information about deployment on Mac OS X.";

        return 0;
    }

    if (appBundlePath.endsWith("/"))
        appBundlePath.chop(1);

    if (QDir().exists(appBundlePath) == false) {
        qDebug() << "Error: Could not find app bundle" << appBundlePath;
        return 0;
    }

    bool plugins = true;
    bool dmg = false;
    bool useDebugLibs = false;
    extern bool runStripEnabled;

    for (int i = 2; i < argc; ++i) {
        QByteArray argument = QByteArray(argv[i]);
        if (argument == QByteArray("-no-plugins")) {
            LogDebug() << "Argument found:" << argument;
            plugins = false;
        } else if (argument == QByteArray("-dmg")) {
            LogDebug() << "Argument found:" << argument;
            dmg = true;
        } else if (argument == QByteArray("-no-strip")) {
            LogDebug() << "Argument found:" << argument;
            runStripEnabled = false;
        } else if (argument == QByteArray("-use-debug-libs")) {
            LogDebug() << "Argument found:" << argument;
            useDebugLibs = true;
            runStripEnabled = false;
        } else if (argument.startsWith(QByteArray("-verbose"))) {
            LogDebug() << "Argument found:" << argument;
            int index = argument.indexOf("=");
            bool ok = false;
            int number = argument.mid(index+1).toInt(&ok);
            if (!ok)
                LogError() << "Could not parse verbose level";
            else
                logLevel = number;
        } else if (argument.startsWith("-")) {
            LogError() << "Unknown argument" << argument << "\n";
            return 0;
        }
     }

    DeploymentInfo deploymentInfo  = deployQtFrameworks(appBundlePath, useDebugLibs);

    if (plugins) {
        if (deploymentInfo.qtPath.isEmpty())
            deploymentInfo.pluginPath = "/Developer/Applications/Qt/plugins"; // Assume binary package.
        else
            deploymentInfo.pluginPath = deploymentInfo.qtPath + "/plugins";

        LogNormal();
        deployPlugins(appBundlePath, deploymentInfo, useDebugLibs);
        createQtConf(appBundlePath);
    }

    if (dmg) {
        LogNormal();
        createDiskImage(appBundlePath);
    }
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:91,代码来源:main.cpp

示例12: nfs3_fsstat

int nfs3_fsstat(nfs_arg_t *arg, struct svc_req *req, nfs_res_t *res)
{
	fsal_dynamicfsinfo_t dynamicinfo;
	cache_inode_status_t cache_status;
	cache_entry_t *entry = NULL;
	int rc = NFS_REQ_OK;

	if (isDebug(COMPONENT_NFSPROTO)) {
		char str[LEN_FH_STR];

		nfs_FhandleToStr(req->rq_vers, &(arg->arg_fsstat3.fsroot), NULL,
				 str);
		LogDebug(COMPONENT_NFSPROTO,
			 "REQUEST PROCESSING: Calling nfs3_fsstat handle: %s",
			 str);
	}

	/* to avoid setting it on each error case */
	res->res_fsstat3.FSSTAT3res_u.resfail.obj_attributes.attributes_follow =
	    FALSE;

	entry = nfs3_FhandleToCache(&arg->arg_fsstat3.fsroot,
				    &res->res_fsstat3.status,
				    &rc);

	if (entry == NULL) {
		/* Status and rc have been set by nfs3_FhandleToCache */
		goto out;
	}

	/* Get statistics and convert from cache */
	cache_status = cache_inode_statfs(entry,
					  &dynamicinfo);

	if (cache_status == CACHE_INODE_SUCCESS) {
		LogFullDebug(COMPONENT_NFSPROTO,
			     "nfs_Fsstat --> dynamicinfo.total_bytes=%" PRIu64
			     " dynamicinfo.free_bytes=%" PRIu64
			     " dynamicinfo.avail_bytes=%" PRIu64,
			     dynamicinfo.total_bytes, dynamicinfo.free_bytes,
			     dynamicinfo.avail_bytes);
		LogFullDebug(COMPONENT_NFSPROTO,
			     "nfs_Fsstat --> dynamicinfo.total_files=%" PRIu64
			     " dynamicinfo.free_files=%" PRIu64
			     " dynamicinfo.avail_files=%" PRIu64,
			     dynamicinfo.total_files, dynamicinfo.free_files,
			     dynamicinfo.avail_files);

		nfs_SetPostOpAttr(entry,
				  &(res->res_fsstat3.FSSTAT3res_u.resok.
				    obj_attributes));

		res->res_fsstat3.FSSTAT3res_u.resok.tbytes =
		    dynamicinfo.total_bytes;
		res->res_fsstat3.FSSTAT3res_u.resok.fbytes =
		    dynamicinfo.free_bytes;
		res->res_fsstat3.FSSTAT3res_u.resok.abytes =
		    dynamicinfo.avail_bytes;
		res->res_fsstat3.FSSTAT3res_u.resok.tfiles =
		    dynamicinfo.total_files;
		res->res_fsstat3.FSSTAT3res_u.resok.ffiles =
		    dynamicinfo.free_files;
		res->res_fsstat3.FSSTAT3res_u.resok.afiles =
		    dynamicinfo.avail_files;
		/* volatile FS */
		res->res_fsstat3.FSSTAT3res_u.resok.invarsec = 0;

		res->res_fsstat3.status = NFS3_OK;

		LogFullDebug(COMPONENT_NFSPROTO,
			     "nfs_Fsstat --> tbytes=%llu fbytes=%llu abytes=%llu",
			     res->res_fsstat3.FSSTAT3res_u.resok.tbytes,
			     res->res_fsstat3.FSSTAT3res_u.resok.fbytes,
			     res->res_fsstat3.FSSTAT3res_u.resok.abytes);

		LogFullDebug(COMPONENT_NFSPROTO,
			     "nfs_Fsstat --> tfiles=%llu fffiles=%llu afiles=%llu",
			     res->res_fsstat3.FSSTAT3res_u.resok.tfiles,
			     res->res_fsstat3.FSSTAT3res_u.resok.ffiles,
			     res->res_fsstat3.FSSTAT3res_u.resok.afiles);

		rc = NFS_REQ_OK;
		goto out;
	}

	/* At this point we met an error */
	if (nfs_RetryableError(cache_status)) {
		rc = NFS_REQ_DROP;
		goto out;
	}

	res->res_fsstat3.status = nfs3_Errno(cache_status);
	rc = NFS_REQ_OK;

 out:
	/* return references */
	if (entry)
		cache_inode_put(entry);

	return rc;
//.........这里部分代码省略.........
开发者ID:Anuradha-Talur,项目名称:nfs-ganesha,代码行数:101,代码来源:nfs3_fsstat.c

示例13: cache_inode_getattr

/**
 *
 * cache_inode_getattr: Gets the attributes for a cached entry.
 *
 * Gets the attributes for a cached entry. The FSAL attributes are kept in a structure when the entry
 * is added to the cache.
 *
 * @param pentry [IN] entry to be managed.
 * @param pattr [OUT] pointer to the results
 * @param ht [IN] hash table used for the cache, unused in this call.
 * @param pclient [INOUT] ressource allocated by the client for the nfs management.
 * @param pcontext [IN] FSAL credentials
 * @param pstatus [OUT] returned status.
 *
 * @return CACHE_INODE_SUCCESS if operation is a success \n
 * @return CACHE_INODE_LRU_ERROR if allocation error occured when validating the entry
 *
 */
cache_inode_status_t
cache_inode_getattr(cache_entry_t * pentry,
                    fsal_attrib_list_t * pattr,
                    hash_table_t * ht, /* Unused, kept for protototype's homogeneity */
                    cache_inode_client_t * pclient,
                    fsal_op_context_t * pcontext,
                    cache_inode_status_t * pstatus)
{
    cache_inode_status_t status;
    fsal_handle_t *pfsal_handle = NULL;
    fsal_status_t fsal_status;

    /* sanity check */
    if(pentry == NULL || pattr == NULL ||
       ht == NULL || pclient == NULL || pcontext == NULL)
        {
            *pstatus = CACHE_INODE_INVALID_ARGUMENT;
            LogDebug(COMPONENT_CACHE_INODE,
                     "cache_inode_getattr: returning CACHE_INODE_INVALID_ARGUMENT because of bad arg");
            return *pstatus;
        }

    /* Set the return default to CACHE_INODE_SUCCESS */
    *pstatus = CACHE_INODE_SUCCESS;

    /* stats */
    pclient->stat.nb_call_total += 1;
    inc_func_call(pclient, CACHE_INODE_GETATTR);

    /* Lock the entry */
    P_w(&pentry->lock);
    status = cache_inode_renew_entry(pentry, pattr, ht,
                                     pclient, pcontext, pstatus);
    if(status != CACHE_INODE_SUCCESS)
        {
            V_w(&pentry->lock);
            inc_func_err_retryable(pclient, CACHE_INODE_GETATTR);
            LogFullDebug(COMPONENT_CACHE_INODE,
                         "cache_inode_getattr: returning %d(%s) from cache_inode_renew_entry",
                         *pstatus, cache_inode_err_str(*pstatus));
            return *pstatus;
        }

    /* RW Lock goes for writer to reader */
    rw_lock_downgrade(&pentry->lock);

    cache_inode_get_attributes(pentry, pattr);

    if(FSAL_TEST_MASK(pattr->asked_attributes,
                      FSAL_ATTR_RDATTR_ERR))
        {
            switch (pentry->internal_md.type)
                {
                case REGULAR_FILE:
                    pfsal_handle = &pentry->object.file.handle;
                    break;

                case SYMBOLIC_LINK:
                    assert(pentry->object.symlink);
                    pfsal_handle = &pentry->object.symlink->handle;
                    break;

                case DIR_BEGINNING:
                    pfsal_handle = &pentry->object.dir_begin.handle;
                    break;

                case DIR_CONTINUE:
                    /*
                     * lock the related dir_begin (dir begin are garbagge
                     * collected AFTER their related dir_cont)
                     * this means that if a DIR_CONTINUE exists,
                     * its pdir pointer is not endless
                     */
                    P_r(&pentry->object.dir_cont.pdir_begin->lock);
                    pfsal_handle = &pentry->object.dir_cont.pdir_begin->object.dir_begin.handle;
                    V_r(&pentry->object.dir_cont.pdir_begin->lock);
                    break;

                case SOCKET_FILE:
                case FIFO_FILE:
                case BLOCK_FILE:
                case CHARACTER_FILE:
//.........这里部分代码省略.........
开发者ID:eitanb,项目名称:nfs-ganesha,代码行数:101,代码来源:cache_inode_getattr.c

示例14: LogDebug

void PlaylistEntryBrightness::Dump(void)
{
	LogDebug(VB_PLAYLIST, "Brightness: %d\n", m_brightness);
}
开发者ID:dkulp,项目名称:fpp,代码行数:4,代码来源:PlaylistEntryBrightness.cpp

示例15: ZFSFSAL_symlink

fsal_status_t ZFSFSAL_symlink(fsal_handle_t * parent_directory_handle,     /* IN */
                           fsal_name_t * p_linkname,    /* IN */
                           fsal_path_t * p_linkcontent, /* IN */
                           fsal_op_context_t * p_context,       /* IN */
                           fsal_accessmode_t accessmode,        /* IN (ignored) */
                           fsal_handle_t * link_handle, /* OUT */
                           fsal_attrib_list_t * link_attributes /* [ IN/OUT ] */
    )
{

  creden_t cred;

  /* sanity checks.
   * note : link_attributes is optional.
   */
  if(!parent_directory_handle ||
     !p_context || !link_handle || !p_linkname || !p_linkcontent)
    Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_symlink);

  /* Tests if symlinking is allowed by configuration. */
  if(!global_fs_info.symlink_support)
    Return(ERR_FSAL_NOTSUPP, 0, INDEX_FSAL_symlink);

  /* Hook to prevent creation of anything inside the snapshot */
  if(((zfsfsal_handle_t *)parent_directory_handle)->data.i_snap != 0)
  {
    LogDebug(COMPONENT_FSAL, "Trying to create a symlink inside a snapshot");
    Return(ERR_FSAL_ROFS, 0, INDEX_FSAL_symlink);
  }

  cred.uid = p_context->credential.user;
  cred.gid = p_context->credential.group;

  TakeTokenFSCall();

  inogen_t object;
  libzfswrap_symlink(((zfsfsal_op_context_t *)p_context)->export_context->p_vfs,
                     &cred,
                     ((zfsfsal_handle_t *)parent_directory_handle)->data.zfs_handle,
                     p_linkname->name,
                     p_linkcontent->path, &object);

  ReleaseTokenFSCall();

  /* >> convert status and return on error <<  */

  /* >> set output handle << */
  ((zfsfsal_handle_t *)link_handle)->data.zfs_handle = object;
  ((zfsfsal_handle_t *)link_handle)->data.type = FSAL_TYPE_LNK;
  ((zfsfsal_handle_t *)link_handle)->data.i_snap = 0;

  if(link_attributes)
    {

      fsal_status_t status = ZFSFSAL_getattrs(link_handle, p_context, link_attributes);

      /* On error, we set a flag in the returned attributes */
      if(FSAL_IS_ERROR(status))
        {
          FSAL_CLEAR_MASK(link_attributes->asked_attributes);
          FSAL_SET_MASK(link_attributes->asked_attributes, FSAL_ATTR_RDATTR_ERR);
        }
    }

  /* OK */
  Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_symlink);
}
开发者ID:ShyamsundarR,项目名称:nfs-ganesha,代码行数:67,代码来源:fsal_symlinks.c


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