Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
b0eee6d5
Commit
b0eee6d5
authored
4 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Fix pointer truncation warning in ssl init inside tests
parent
ab1922cd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llcorehttp/examples/http_texture_load.cpp
+7
-8
7 additions, 8 deletions
indra/llcorehttp/examples/http_texture_load.cpp
indra/llcorehttp/tests/llcorehttp_test.cpp
+6
-8
6 additions, 8 deletions
indra/llcorehttp/tests/llcorehttp_test.cpp
with
13 additions
and
16 deletions
indra/llcorehttp/examples/http_texture_load.cpp
+
7
−
8
View file @
b0eee6d5
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#if !defined(WIN32)
#if !defined(WIN32)
#include
<pthread.h>
#include
<pthread.h>
#endif
#endif
#include
<thread>
#include
"linden_common.h"
#include
"linden_common.h"
...
@@ -52,7 +53,7 @@
...
@@ -52,7 +53,7 @@
void
init_curl
();
void
init_curl
();
void
term_curl
();
void
term_curl
();
void
ssl_thread_id
_callback
(
CRYPTO_THREADID
*
);
unsigned
long
ssl_thread_id
(
void
);
void
ssl_locking_callback
(
int
mode
,
int
type
,
const
char
*
file
,
int
line
);
void
ssl_locking_callback
(
int
mode
,
int
type
,
const
char
*
file
,
int
line
);
void
usage
(
std
::
ostream
&
out
);
void
usage
(
std
::
ostream
&
out
);
...
@@ -624,7 +625,7 @@ void init_curl()
...
@@ -624,7 +625,7 @@ void init_curl()
}
}
CRYPTO_set_locking_callback
(
ssl_locking_callback
);
CRYPTO_set_locking_callback
(
ssl_locking_callback
);
CRYPTO_
THREADID_
set_callback
(
ssl_thread_id
_callback
);
CRYPTO_set_
id_
callback
(
&
ssl_thread_id
);
}
}
}
}
...
@@ -640,13 +641,11 @@ void term_curl()
...
@@ -640,13 +641,11 @@ void term_curl()
}
}
void
ssl_thread_id_callback
(
CRYPTO_THREADID
*
pthreadid
)
//static
unsigned
long
ssl_thread_id
(
void
)
{
{
#if defined(WIN32)
// std::thread::id is very deliberately opaque, but we can hash it
CRYPTO_THREADID_set_pointer
(
pthreadid
,
GetCurrentThread
());
return
std
::
hash
<
std
::
thread
::
id
>
()(
std
::
this_thread
::
get_id
());
#else
CRYPTO_THREADID_set_pointer
(
pthreadid
,
pthread_self
());
#endif
}
}
...
...
This diff is collapsed.
Click to expand it.
indra/llcorehttp/tests/llcorehttp_test.cpp
+
6
−
8
View file @
b0eee6d5
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
#include
"llproxy.h"
#include
"llproxy.h"
#include
"llcleanup.h"
#include
"llcleanup.h"
void
ssl_thread_id
_callback
(
CRYPTO_THREADID
*
);
unsigned
long
ssl_thread_id
(
void
);
void
ssl_locking_callback
(
int
mode
,
int
type
,
const
char
*
file
,
int
line
);
void
ssl_locking_callback
(
int
mode
,
int
type
,
const
char
*
file
,
int
line
);
#if 0 // lltut provides main and runner
#if 0 // lltut provides main and runner
...
@@ -98,7 +98,7 @@ void init_curl()
...
@@ -98,7 +98,7 @@ void init_curl()
}
}
CRYPTO_set_locking_callback
(
ssl_locking_callback
);
CRYPTO_set_locking_callback
(
ssl_locking_callback
);
CRYPTO_
THREADID_
set_callback
(
ssl_thread_id
_callback
);
CRYPTO_set_
id_
callback
(
&
ssl_thread_id
);
}
}
LLProxy
::
getInstance
();
LLProxy
::
getInstance
();
...
@@ -118,13 +118,11 @@ void term_curl()
...
@@ -118,13 +118,11 @@ void term_curl()
}
}
void
ssl_thread_id_callback
(
CRYPTO_THREADID
*
pthreadid
)
//static
unsigned
long
ssl_thread_id
(
void
)
{
{
#if defined(WIN32)
// std::thread::id is very deliberately opaque, but we can hash it
CRYPTO_THREADID_set_pointer
(
pthreadid
,
GetCurrentThread
());
return
std
::
hash
<
LLThread
::
id_t
>
()(
LLThread
::
currentID
());
#else
CRYPTO_THREADID_set_pointer
(
pthreadid
,
pthread_self
());
#endif
}
}
...
...
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