File handler client info is C++ object now.

This commit is contained in:
2026-05-05 17:39:39 -04:00
parent b5bb11dbd0
commit 4fa86606cc
+12 -8
View File
@@ -101,6 +101,8 @@ struct ClientInfo {
int err_code; int err_code;
int flags; int flags;
int old_style; int old_style;
~ClientInfo();
}; };
/* /*
@@ -916,16 +918,18 @@ static ClientInfo *File_add_client(int sock_fd)
static void File_remove_client(ClientInfo *client) static void File_remove_client(ClientInfo *client)
{ {
Clients.erase( std::find( begin( Clients ), end( Clients ), client ) ); Clients.erase( std::find( begin( Clients ), end( Clients ), client ) );
delete client;
}
ClientInfo::~ClientInfo()
{
_MSG("Closing Socket Handler\n"); _MSG("Closing Socket Handler\n");
a_Dpip_dsh_close(client->sh); a_Dpip_dsh_close(sh);
a_Dpip_dsh_free(client->sh); a_Dpip_dsh_free(sh);
File_close(client->file_fd); File_close(file_fd);
dFree(client->orig_url); dFree(orig_url);
dFree(client->filename); dFree(filename);
File_dillodir_free(client->d_dir); File_dillodir_free(d_dir);
dFree(client);
} }
/* /*