summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2013-06-09 19:42:04 +0200
committerYorhel <git@yorhel.nl>2013-06-09 19:42:04 +0200
commit1b27c1457c777bc77304e358be946ace6c53d3df (patch)
treeee4f88a825c1a90ebd77ec73c3f35a6da211190b
parentb60066e534e523153db7fdd50a99afdc1637a559 (diff)
hub/adc: Make sure that the uid of the connecting user is 0
Bug reported by MiMic.
-rw-r--r--src/hub/adc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hub/adc.c b/src/hub/adc.c
index 3a0819c..40919f5 100644
--- a/src/hub/adc.c
+++ b/src/hub/adc.c
@@ -305,7 +305,7 @@ static bool hub_adc_inf_user_update(hub_user_update_t *d, const char *cmd, int l
char emptycid[sizeof(d->u->a.cid)] = {};
if(memcmp(d->u->a.cid, emptycid, sizeof(d->u->a.cid)) == 0)
ERR("No CID in INF for new user");
- d->u->id = hub_users_genid(d->h, d->u->a.cid, sizeof(d->u->a.cid));
+ d->u->id = d->u->a.sid == d->h->a.mysid ? 0 : hub_users_genid(d->h, d->u->a.cid, sizeof(d->u->a.cid));
}
return true;
}