Skip to content

Instantly share code, notes, and snippets.

@tony2001
Created March 21, 2017 13:09
Show Gist options
  • Save tony2001/fd9dcb94dcba06ea2ec38531fd50c143 to your computer and use it in GitHub Desktop.
Save tony2001/fd9dcb94dcba06ea2ec38531fd50c143 to your computer and use it in GitHub Desktop.
diff --git a/src/purge_active.c b/src/purge_active.c
index 4cf0051..a2b1eb1 100644
--- a/src/purge_active.c
+++ b/src/purge_active.c
@@ -67,7 +67,7 @@ static int purge_active(struct idle_task_s *it, void *arg __attribute__ ((unused
watchdog_set_subtag("%"PRIu32, user_id);
- struct user_s *u = user_get_by_id(user_id);
+ struct user_s *u = (struct user_s *) *PValue;
if (!u) {
zlog_error("User %"PRIu32" not found. Something is terribly wrong.", user_id);
debugger();
diff --git a/src/user.c b/src/user.c
index 08bce53..2f1a1ee 100644
--- a/src/user.c
+++ b/src/user.c
@@ -1420,7 +1420,7 @@ int users_update_all()
goto next;
}
- const struct user_s *u = user_get_by_id(user_id);
+ struct user_s *u = (struct user_s *) *PValue;
if (!u) {
debugger();
return -1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment