git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add async pool (to replace EVENT_LOOP).
[stg.git]
/
projects
/
stargazer
/
plugins
/
other
/
smux
/
sensors.cpp
diff --git
a/projects/stargazer/plugins/other/smux/sensors.cpp
b/projects/stargazer/plugins/other/smux/sensors.cpp
index f52a413b7aeff6543e3a4ccf32da5e67012cc0cf..9a87cbdaa5e2b0bd46fdd20c223ce8a2a2e51b27 100644
(file)
--- a/
projects/stargazer/plugins/other/smux/sensors.cpp
+++ b/
projects/stargazer/plugins/other/smux/sensors.cpp
@@
-11,7
+11,7
@@
bool UsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
int handle = users.OpenSearch();
assert(handle && "USERS::OpenSearch is always correct");
int handle = users.OpenSearch();
assert(handle && "USERS::OpenSearch is always correct");
-
USER_PTR
user;
+
STG::User*
user;
size_t count = 0;
while (!users.SearchNext(handle, &user))
{
size_t count = 0;
while (!users.SearchNext(handle, &user))
{
@@
-31,7
+31,7
@@
std::string UsersSensor::ToString() const
int handle = users.OpenSearch();
assert(handle && "USERS::OpenSearch is always correct");
int handle = users.OpenSearch();
assert(handle && "USERS::OpenSearch is always correct");
-
USER_PTR
user;
+
STG::User*
user;
size_t count = 0;
while (!users.SearchNext(handle, &user))
{
size_t count = 0;
while (!users.SearchNext(handle, &user))
{
@@
-41,13
+41,11
@@
while (!users.SearchNext(handle, &user))
users.CloseSearch(handle);
users.CloseSearch(handle);
-std::string res;
-x2str(count, res);
-return res;
+return std::to_string(count);
}
#endif
}
#endif
-bool ActiveUsersSensor::UserPredicate(
USER_PTR
userPtr) const
+bool ActiveUsersSensor::UserPredicate(
STG::User*
userPtr) const
{
if (!userPtr->GetConnected())
return false;
{
if (!userPtr->GetConnected())
return false;