aboutsummaryrefslogtreecommitdiff
path: root/user_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'user_data.c')
-rw-r--r--user_data.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/user_data.c b/user_data.c
index 125a6b4..a69ec78 100644
--- a/user_data.c
+++ b/user_data.c
@@ -23,6 +23,7 @@ static void userdata_constructor() {
void userdata_register(i64 userid,int fd){
struct user_data *data=ht_find(user_hash, userid);
if(data){
+ debug("userdata_register(%" PRIi64 ", %d) -> new fd",userid,fd);
for(i64 i=0;i<data->len;i++){
if(data->fds[i]==fd){
die("userdata_register(%" PRIi64 ", %d) while pair already existed",userid,fd);
@@ -37,6 +38,7 @@ void userdata_register(i64 userid,int fd){
data->last_active[data->len]=make_timestamp();
data->len++;
} else {
+ debug("userdata_register(%" PRIi64 ", %d) -> new userid",userid,fd);
data=malloc(1, struct user_data);
data->userid=userid;
data->cap=2;
@@ -50,6 +52,7 @@ void userdata_register(i64 userid,int fd){
}
void userdata_unregister(i64 userid,int fd){
+ debug("userdata_unregister(%" PRIi64 ", %d)",userid,fd);
struct user_data *data=ht_find(user_hash,userid);
if(!data){
die("userdata_unregister(%" PRIi64 ", %d) while nonexistent",userid,fd);