diff --git a/socket.c b/socket.c index d3751fe..40d07d6 100644 --- a/socket.c +++ b/socket.c @@ -167,6 +167,7 @@ userCount--; sprintf(output,"DELETE FROM active WHERE userid = %lld",delConnection->userInfo.uid); + dbQuery(output); //Free the bad connection free(delConnection); @@ -178,7 +179,9 @@ int sRemoveConnection(int socketFD) { myConnections_t *tmpConnection = 0x0; - writeLog(2,"Removing Socket: socketFD\n"); + char output[256]; + + writeLog(2,"Removing Socket: %i\n",socketFD); for (tmpConnection = connections->next;tmpConnection != 0x0;tmpConnection = tmpConnection->next) { if (tmpConnection->fd == socketFD) { @@ -190,6 +193,9 @@ writeLog(2,"Removed Socket: [%i]\n",tmpConnection->fd); userCount--; + + sprintf(output,"DELETE FROM active WHERE userid = %lld",tmpConnection->userInfo.uid); + dbQuery(output); free(tmpConnection); return(0x0);