Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
ffb35ff5
Commit
ffb35ff5
authored
21 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
Günter Knauf's update, mainly converted to plain old C comments.
parent
8eda0613
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/nwlib.c
+11
-14
11 additions, 14 deletions
lib/nwlib.c
with
11 additions
and
14 deletions
lib/nwlib.c
+
11
−
14
View file @
ffb35ff5
...
...
@@ -21,8 +21,6 @@
* $Id$
***************************************************************************/
/* This file is only used in the NetWare build */
#include
<errno.h>
#include
<string.h>
#include
<stdlib.h>
...
...
@@ -45,7 +43,7 @@ typedef struct
int
y
;
int
z
;
void
*
tenbytes
;
NXKey_t
perthreadkey
;
/
/ if -1, no key obtained...
NXKey_t
perthreadkey
;
/
*
if -1, no key obtained...
*/
NXMutex_t
*
lock
;
}
libdata_t
;
...
...
@@ -54,9 +52,7 @@ void *gLibHandle = (void *) NULL;
rtag_t
gAllocTag
=
(
rtag_t
)
NULL
;
NXMutex_t
*
gLibLock
=
(
NXMutex_t
*
)
NULL
;
// internal library function prototypes...
/* internal library function prototypes... */
int
DisposeLibraryData
(
void
*
);
void
DisposeThreadData
(
void
*
);
int
GetOrSetUpData
(
int
id
,
libdata_t
**
data
,
libthreaddata_t
**
threaddata
);
...
...
@@ -129,18 +125,16 @@ int _NonAppStart
return
0
;
}
void
_NonAppStop
(
void
)
{
/*
** Here we clean up any resources we allocated. Resource tags is a big part
** of what we created, but NetWare doesn't ask us to free those.
*/
void
_NonAppStop
(
void
)
{
(
void
)
unregister_library
(
gLibId
);
NXMutexFree
(
gLibLock
);
}
int
_NonAppCheckUnload
(
void
)
{
/*
** This function cannot be the first in the file for if the file is linked
** first, then the check-unload function's offset will be nlmname.nlm+0
...
...
@@ -152,6 +146,8 @@ int _NonAppCheckUnload( void )
** we return a non-zero value. Right now, there isn't any reason not to allow
** it.
*/
int
_NonAppCheckUnload
(
void
)
{
return
0
;
}
...
...
@@ -166,7 +162,6 @@ int GetOrSetUpData
libdata_t
*
app_data
;
libthreaddata_t
*
thread_data
;
NXKey_t
key
;
// NXMutex_t *lock;
NX_LOCK_INFO_ALLOC
(
liblock
,
"Application Data Lock"
,
0
);
err
=
0
;
...
...
@@ -231,10 +226,10 @@ int GetOrSetUpData
}
else
{
/
/
create key for thread-specific data...
/
*
create key for thread-specific data...
*/
err
=
NXKeyCreate
(
DisposeThreadData
,
(
void
*
)
NULL
,
&
key
);
if
(
err
)
/
/
(no more keys left?)
if
(
err
)
/
*
(no more keys left?)
*/
key
=
-
1
;
app_data
->
perthreadkey
=
key
;
...
...
@@ -250,7 +245,7 @@ int GetOrSetUpData
{
key
=
app_data
->
perthreadkey
;
if
(
key
!=
-
1
/
/
couldn't create a key? no thread data
if
(
key
!=
-
1
/
*
couldn't create a key? no thread data
*/
&&
!
(
err
=
NXKeyGetValue
(
key
,
(
void
**
)
&
thread_data
))
&&
!
thread_data
)
{
...
...
@@ -327,3 +322,5 @@ void DisposeThreadData
free
(
data
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment