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


C++ Debug3函数代码示例

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


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

示例1: Gettimeofday

int Gettimeofday(struct timeval *tv, struct timezone *tz) {
   int result, _errno;
#if WITH_MSGLEVEL <= E_DEBUG
   if (tz) {
      Debug3("gettimeofday(%p, {%d,%d})",
	     tv, tz->tz_minuteswest, tz->tz_dsttime);
   } else {
      Debug1("gettimeofday(%p, NULL)", tv);
   }
#endif /* WITH_MSGLEVEL <= E_DEBUG */
   result = gettimeofday(tv, tz);
   _errno = errno;
#if WITH_MSGLEVEL <= E_DEBUG
   if (tz) {
      Debug5("gettimeofday({%ld,%ld}, {%d,%d}) -> %d",
             tv->tv_sec, tv->tv_usec, tz->tz_minuteswest, tz->tz_dsttime,
	     result);
   } else {
      Debug3("gettimeofday({%ld,%ld},) -> %d",
	     tv->tv_sec, tv->tv_usec, result);
   }
#endif /* WITH_MSGLEVEL <= E_DEBUG */
   errno = _errno;
   return result;
}
开发者ID:erluko,项目名称:socat,代码行数:25,代码来源:sycls.c

示例2: RemoveRideRelation

bool EntityManager::DeletePlayer(Client * client)
{
    gemActor *actor = client->GetActor();
    if (actor && actor->GetCharacterData()!=NULL)
    {
        // take the actor off his mount if he got one
        if(actor->GetMount())
            RemoveRideRelation(actor);
            
        //As we show the logged in status only when the client gets ready we check if it 
        //was ready before doing this
        if(client->IsReady())
        {
            // Check for buddy list members
            usermanager->NotifyBuddies(client, UserManager::LOGGED_OFF);
        
            // Check for Guild members to notify
            usermanager->NotifyGuildBuddies(client, UserManager::LOGGED_OFF);
            
            //check for alliance members to notify
            usermanager->NotifyAllianceBuddies(client, UserManager::LOGGED_OFF);
        }

        // Any objects wanting to know when the actor is 'gone' are callback'd here.
        actor->Disconnect();

        if (!dynamic_cast<gemNPC*> (actor))  // NPC cast null means a human player
        {
            // Save current character state in the database
            psServer::CharacterLoader.SaveCharacterData(actor->GetCharacterData(),actor);
        }
         
        gemActor *familiar = client->GetFamiliar();
        if ( familiar != NULL && familiar->IsValid())
        {
            // Send OwnerActionLogoff Perception

            //familiar->Disconnect();
            Debug3(LOG_NET,client->GetClientNum(),"EntityManager Removing actor %s from client %s.",familiar->GetName(),client->GetName() );
            psServer::CharacterLoader.SaveCharacterData(familiar->GetCharacterData(),familiar);
            client->SetFamiliar( NULL );
            RemoveActor( familiar );
        }

        // This removes the actor from the world data
        Debug3(LOG_NET,client->GetClientNum(),"EntityManager Removing actor %s from client %s.",actor->GetName(),client->GetName() );
        gem->RemoveClientFromLootables(client->GetClientNum());
        client->SetActor(NULL); // Prevent anyone from getting to a deleted actor through the client
        RemoveActor(actor);
    }
    return true;
}
开发者ID:garinh,项目名称:planeshift,代码行数:52,代码来源:entitymanager.cpp

示例3: Nanosleep

unsigned int Nanosleep(const struct timespec *req, struct timespec *rem) {
   int retval, _errno;
   Debug3("nanosleep({"F_time",%ld},%p)", req->tv_sec, req->tv_nsec, rem);
   retval = nanosleep(req, rem);
   _errno = errno;
   if (rem) {
      Debug3("nanosleep(,{"F_time",%ld}) -> %d",
	     rem->tv_sec, rem->tv_nsec, retval);
   } else {
      Debug1("nanosleep() -> %d", retval);
   }
   errno = _errno;
   return retval;
}
开发者ID:erluko,项目名称:socat,代码行数:14,代码来源:sycls.c

示例4: mesg

void pawsContainerDescWindow::HandleUpdateItem( MsgEntry* me )
{
    psViewItemUpdate mesg( me, ((psNetManager*)psengine->GetNetManager())->GetConnection()->GetAccessPointers() );
    csString sigData, data;

    // We send ownerID to multiple clients, so each client must decide if the item is owned by
    // them or not.  This is double checked on the server if someone tries to move an item,
    // so hacking this to override just breaks the display, but does not enable a cheat.
    if (mesg.ownerID.IsValid() && mesg.ownerID != psengine->GetCelClient()->GetMainPlayer()->GetEID())
    {
        mesg.stackCount = -1; // hardcoded signal that item is not owned by this player
    }

    sigData.Format("invslot_%d", mesg.containerID.Unbox() * 100 + mesg.slotID + 16);
    if (!mesg.clearSlot)
    {
        data.Format("%s %d %d %s %s %s", mesg.icon.GetData(), mesg.stackCount, 0, mesg.meshName.GetData(), mesg.materialName.GetData(), mesg.name.GetData());
    }

    Debug3(LOG_CHARACTER, 0, "Got item update for %s: %s\n", sigData.GetDataSafe(), data.GetDataSafe() );

    // FIXME: psViewItemMessages should probably send out purification status

    PawsManager::GetSingleton().Publish(sigData, data);
}
开发者ID:randomcoding,项目名称:PlaneShift-PSAI,代码行数:25,代码来源:pawscontainerdescwindow.cpp

示例5: Show

void pawsNpcDialogWindow::OnStringEntered(const char* name, int param, const char* value)
{
    //The user cancelled the operation. So show again the last window and do nothing else.
    if(value == NULL)
    {
        Show();
        return;
    }

    Debug3(LOG_QUESTS, 0,"Got name=%s, value=%s\n", name, value);

    csString cmd;
    if(param != -1)
    {
        cmd.Format("/tellnpc {%d} %s", param, value);
    }
    else
    {
        cmd.Format("/tellnpc %s", value);
    }

    psengine->GetCmdHandler()->Publish(cmd);
    DisplayTextInChat(value);
    ticks = csGetTicks(); // reset time, so we can wait for the next server response
    gotNewMenu = false;
}
开发者ID:Mixone-FinallyHere,项目名称:planeshift,代码行数:26,代码来源:pawsnpcdialog.cpp

示例6: sycSSL_read

int sycSSL_read(SSL *ssl, void *buf, int num) {
   int result;
   Debug3("SSL_read(%p, %p, %d)", ssl, buf, num);
   result = SSL_read(ssl, buf, num);
   Debug1("SSL_read() -> %d", result);
   return result;
}
开发者ID:dest-unreach,项目名称:socat2,代码行数:7,代码来源:sslcls.c

示例7: Sigprocmask

int Sigprocmask(int how, const sigset_t *set, sigset_t *oset) {
   int retval;
   Debug3("sigprocmask(%d, %p, %p)", how, set, oset);
   retval = sigprocmask(how, set, oset);
   Debug1("sigprocmask() -> %d", retval);
   return retval;
}
开发者ID:erluko,项目名称:socat,代码行数:7,代码来源:sycls.c

示例8: sycSSL_write

int sycSSL_write(SSL *ssl, const void *buf, int num) {
   int result;
   Debug3("SSL_write(%p, %p, %d)", ssl, buf, num);
   result = SSL_write(ssl, buf, num);
   Debug1("SSL_write() -> %d", result);
   return result;
}
开发者ID:dest-unreach,项目名称:socat2,代码行数:7,代码来源:sslcls.c

示例9: Debug3

bool psEntity::CanPlay(int time, float range) const
{
    EntityState* entityState;

    // checking if it is in the undefined state
    entityState = states.Get(state, 0);
    if(entityState == 0)
    {
        Debug3(LOG_SOUND, 0, "psEntity::CanPlay %s meshid: %u undefined state.", entityName.GetData(), GetMeshID());
        return false;
    }

    // checking time, range and delay
    if(range < minRange || range > maxRange)
    {
        Debug6(LOG_SOUND, 0, "psEntity::CanPlay %s meshid: %u range %f %f %f", entityName.GetData(),GetMeshID(), minRange, range, maxRange);
        return false;
    }
    else if(time < entityState->timeOfDayStart || entityState->timeOfDayEnd < time)
    {
        Debug6(LOG_SOUND, 0, "psEntity::CanPlay %s meshid: %u time of day %d %d %d", entityName.GetData(),GetMeshID(), entityState->timeOfDayStart,time,entityState->timeOfDayEnd);
        return false;
    }
    else if(when <= 0)
    {
        Debug4(LOG_SOUND, 0, "psEntity::CanPlay TRUE %s meshid: %u when <0 : %d", entityName.GetData(),GetMeshID(), when);
        return true;
    }
    Debug4(LOG_SOUND, 0, "psEntity::CanPlay %s meshid: %u when : %d", entityName.GetData(),GetMeshID(), when);

    return false;
}
开发者ID:Chettie,项目名称:Eulora-client,代码行数:32,代码来源:psentity.cpp

示例10: merge_error_info

/*
 * Merge error information in "lr" with "parentr" error code and string.
 */
static void
merge_error_info( LDAP *ld, LDAPRequest *parentr, LDAPRequest *lr )
{
	if ( lr->lr_res_errno == LDAP_PARTIAL_RESULTS ) {
		parentr->lr_res_errno = lr->lr_res_errno;
		if ( lr->lr_res_error != NULL ) {
			(void)ldap_append_referral( ld, &parentr->lr_res_error,
				lr->lr_res_error );
		}

	} else if ( lr->lr_res_errno != LDAP_SUCCESS &&
		parentr->lr_res_errno == LDAP_SUCCESS )
	{
		parentr->lr_res_errno = lr->lr_res_errno;
		if ( parentr->lr_res_error != NULL ) {
			LDAP_FREE( parentr->lr_res_error );
		}
		parentr->lr_res_error = lr->lr_res_error;
		lr->lr_res_error = NULL;
		if ( LDAP_NAME_ERROR( lr->lr_res_errno ) ) {
			if ( parentr->lr_res_matched != NULL ) {
				LDAP_FREE( parentr->lr_res_matched );
			}
			parentr->lr_res_matched = lr->lr_res_matched;
			lr->lr_res_matched = NULL;
		}
	}

	Debug1( LDAP_DEBUG_TRACE, "merged parent (id %d) error info:  ",
		parentr->lr_msgid );
	Debug3( LDAP_DEBUG_TRACE, "result errno %d, error <%s>, matched <%s>\n",
		parentr->lr_res_errno,
		parentr->lr_res_error ?  parentr->lr_res_error : "",
		parentr->lr_res_matched ?  parentr->lr_res_matched : "" );
}
开发者ID:openldap,项目名称:openldap,代码行数:38,代码来源:result.c

示例11: trigger

NpcResponse *ChatManager::CheckNPCEvent(Client *client,csString& triggerText,gemNPC * &target)
{
    gemNPC *npc = target;

    if (npc && npc->IsAlive())
    {
        csString trigger(triggerText);
        trigger.Downcase();

        psNPCDialog *npcdlg = npc->GetNPCDialogPtr();

        if (npcdlg)  // if NULL, then NPC never speaks
        {
            float dist = npc->RangeTo( client->GetActor() );

            if (dist > MAX_NPC_DIALOG_DIST)
                return NULL;

            Debug3(LOG_NPC, client->GetClientNum(),"%s checking trigger %s.\n",target->GetName(),trigger.GetData() );
            return npcdlg->Respond(trigger,client);
        }
        else
        {
            // Admins and GMs can see a better error on the client
            if (client->GetSecurityLevel() > 20)
                psserver->SendSystemError(client->GetClientNum(),"%s cannot speak.",npc->GetName() );

            Debug2(LOG_NPC, client->GetClientNum(),"NPC %s cannot speak.\n",npc->GetName() );
        }
    }
    return NULL;
}
开发者ID:randomcoding,项目名称:PlaneShift-PSAI,代码行数:32,代码来源:chatmanager.cpp

示例12: sycSSL_CTX_use_PrivateKey_file

int sycSSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) {
   int result;
   Debug3("SSL_CTX_use_PrivateKey_file(%p, \"%s\", %d)", ctx, file, type);
   result = SSL_CTX_use_PrivateKey_file(ctx, file, type);
   Debug1("SSL_CTX_use_PrivateKey_file() -> %d", result);
   return result;
}
开发者ID:dest-unreach,项目名称:socat2,代码行数:7,代码来源:sslcls.c

示例13: Sigaction

int Sigaction(int signum, const struct sigaction *act,
	      struct sigaction *oldact) {
   int retval;
   Debug3("sigaction(%d, %p, %p)", signum, act, oldact);
   retval = sigaction(signum, act, oldact);
   Debug1("sigaction() -> %d", retval);
   return retval;
}
开发者ID:erluko,项目名称:socat,代码行数:8,代码来源:sycls.c

示例14: Chown

int Chown(const char *path, uid_t owner, gid_t group) {
   int retval, _errno;
   Debug3("chown(\"%s\", "F_uid", "F_gid")", path, owner, group);
   retval = chown(path, owner, group);
   _errno = errno;
   Debug1("chown()  -> %d", retval);
   errno = _errno;
   return retval;
}
开发者ID:erluko,项目名称:socat,代码行数:9,代码来源:sycls.c

示例15: Readlink

int Readlink(const char *path, char *buf, size_t bufsiz) {
   int retval, _errno;
   Debug3("readlink(\"%s\", %p, "F_Zu")", path, buf, bufsiz);
   retval = readlink(path, buf, bufsiz);
   _errno = errno;
   Debug1("readlink() -> %d", retval);
   errno = _errno;
   return retval;
}
开发者ID:erluko,项目名称:socat,代码行数:9,代码来源:sycls.c


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