mirror of
https://github.com/nmap/nmap.git
synced 2025-12-14 11:49:01 +00:00
Remove nsock_pool unique identifiers.
This isn't used anywhere and I cannot think of any use case. The NSP is supposed to be unique and global as it controls the event loop.
This commit is contained in:
@@ -202,9 +202,6 @@ void nsock_loop_quit(nsock_pool nsp);
|
||||
* if the status is NSOCK_LOOP_ERROR was returned by nsock_loop() */
|
||||
int nsp_geterrorcode(nsock_pool nsp);
|
||||
|
||||
/* Every nsp has an ID that is unique across the program execution */
|
||||
unsigned long nsp_getid(nsock_pool nsp);
|
||||
|
||||
nsock_ssl nsi_getssl(nsock_iod nsockiod);
|
||||
|
||||
/* Note that nsi_get1_ssl_session will increment the usage count of the
|
||||
|
||||
@@ -152,10 +152,6 @@ struct writeinfo {
|
||||
/* Remember that callers of this library should NOT be accessing these
|
||||
* fields directly */
|
||||
struct npool {
|
||||
|
||||
/* Every msp has a unique (across the program execution) id */
|
||||
unsigned long id;
|
||||
|
||||
/* User data, NULL if unset */
|
||||
void *userdata;
|
||||
|
||||
|
||||
@@ -74,8 +74,6 @@
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
unsigned long nsp_next_id = 2;
|
||||
|
||||
/* To use this library, the first thing they must do is create a pool
|
||||
* so we do the initialization during the first pool creation */
|
||||
static int nsocklib_initialized = 0;
|
||||
@@ -89,15 +87,8 @@ static void nsock_library_initialize(void);
|
||||
/* --------------------------------------- */
|
||||
|
||||
|
||||
/* Every mst has an ID that is unique across the program execution */
|
||||
unsigned long nsp_getid(nsock_pool nsp) {
|
||||
struct npool *mt = (struct npool *)nsp;
|
||||
return mt->id;
|
||||
}
|
||||
|
||||
/* This next function returns the errno style error code -- which is only
|
||||
* valid if the status NSOCK_LOOP_ERROR was returned by nsock_loop() */
|
||||
|
||||
int nsp_geterrorcode(nsock_pool nsp) {
|
||||
struct npool *mt = (struct npool *)nsp;
|
||||
return mt->errnum;
|
||||
@@ -162,8 +153,6 @@ nsock_pool nsp_new(void *userdata) {
|
||||
nsp->loglevel = NSOCK_LOG_ERROR;
|
||||
nsp->logger = (nsock_logger_t)nsock_stderr_logger;
|
||||
|
||||
nsp->id = nsp_next_id++;
|
||||
|
||||
nsp->userdata = userdata;
|
||||
|
||||
nsp->engine = get_io_engine();
|
||||
|
||||
Reference in New Issue
Block a user