1
0
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:
henri
2015-06-27 08:21:05 +00:00
parent 4ad794dc99
commit ab161bbb0b
3 changed files with 0 additions and 18 deletions

View File

@@ -202,9 +202,6 @@ void nsock_loop_quit(nsock_pool nsp);
* if the status is NSOCK_LOOP_ERROR was returned by nsock_loop() */ * if the status is NSOCK_LOOP_ERROR was returned by nsock_loop() */
int nsp_geterrorcode(nsock_pool nsp); 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); nsock_ssl nsi_getssl(nsock_iod nsockiod);
/* Note that nsi_get1_ssl_session will increment the usage count of the /* Note that nsi_get1_ssl_session will increment the usage count of the

View File

@@ -152,10 +152,6 @@ struct writeinfo {
/* Remember that callers of this library should NOT be accessing these /* Remember that callers of this library should NOT be accessing these
* fields directly */ * fields directly */
struct npool { struct npool {
/* Every msp has a unique (across the program execution) id */
unsigned long id;
/* User data, NULL if unset */ /* User data, NULL if unset */
void *userdata; void *userdata;

View File

@@ -74,8 +74,6 @@
extern struct timeval nsock_tod; 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 /* To use this library, the first thing they must do is create a pool
* so we do the initialization during the first pool creation */ * so we do the initialization during the first pool creation */
static int nsocklib_initialized = 0; 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 /* This next function returns the errno style error code -- which is only
* valid if the status NSOCK_LOOP_ERROR was returned by nsock_loop() */ * valid if the status NSOCK_LOOP_ERROR was returned by nsock_loop() */
int nsp_geterrorcode(nsock_pool nsp) { int nsp_geterrorcode(nsock_pool nsp) {
struct npool *mt = (struct npool *)nsp; struct npool *mt = (struct npool *)nsp;
return mt->errnum; return mt->errnum;
@@ -162,8 +153,6 @@ nsock_pool nsp_new(void *userdata) {
nsp->loglevel = NSOCK_LOG_ERROR; nsp->loglevel = NSOCK_LOG_ERROR;
nsp->logger = (nsock_logger_t)nsock_stderr_logger; nsp->logger = (nsock_logger_t)nsock_stderr_logger;
nsp->id = nsp_next_id++;
nsp->userdata = userdata; nsp->userdata = userdata;
nsp->engine = get_io_engine(); nsp->engine = get_io_engine();