-
Notifications
You must be signed in to change notification settings - Fork 23
Rebase with develop #304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebase with develop #304
Changes from all commits
f8114de
28b5426
0492bec
fc678f5
cac6d7f
f3ca322
0f75261
36848b6
a336d80
57b7a6e
2223703
3d23970
31778cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Build system generated files | ||
| Makefile | ||
| Makefile.in | ||
| aclocal.m4 | ||
| autom4te.cache/ | ||
| compile | ||
| config.guess | ||
| config.log | ||
| config.status | ||
| config.sub | ||
| configure | ||
| configure~ | ||
| depcomp | ||
| install-sh | ||
| libtool | ||
| ltmain.sh | ||
| missing | ||
| m4/ | ||
|
|
||
| # Build artifacts | ||
| *.o | ||
| *.lo | ||
| *.la | ||
| *.a | ||
| *.so | ||
| *.bin | ||
| *.deps/ | ||
| *.dirstamp | ||
| .deps/ | ||
| .libs/ | ||
|
|
||
| # Source subdirectory build files | ||
| source/**/Makefile | ||
| source/**/Makefile.in | ||
| source/**/*.deps/ | ||
| source/**/.libs/ |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -428,7 +428,6 @@ static void* reportOnDemand(void *input) | |||||||
| if(!strncmp(action, ON_DEMAND_ACTION_UPLOAD, MAX_PROFILENAMES_LENGTH)) | ||||||||
| { | ||||||||
| T2Info("Upload XCONF report on demand \n"); | ||||||||
|
||||||||
| T2Info("Upload XCONF report on demand \n"); | |
| T2Info("Upload XCONF report on demand \n"); | |
| set_retainseekmap(true); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -21,7 +21,7 @@ AM_CFLAGS = | |||||
| lib_LTLIBRARIES = libhttp.la | ||||||
|
|
||||||
| libhttp_la_SOURCES = curlinterface.c multicurlinterface.c | ||||||
| libhttp_la_LDFLAGS = -shared -fPIC -lcurl | ||||||
| libhttp_la_LDFLAGS = -shared -fPIC -lcurl -lcrypto | ||||||
|
||||||
| libhttp_la_LDFLAGS = -shared -fPIC -lcurl -lcrypto | |
| libhttp_la_LDFLAGS = -shared -fPIC -lcurl |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -33,6 +33,8 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #include <sys/stat.h> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #include <signal.h> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #include <time.h> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #include <openssl/err.h> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #include <openssl/crypto.h> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+36
to
+37
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #include <openssl/err.h> | |
| #include <openssl/crypto.h> | |
| /* | |
| * OpenSSL usage in this file is optional. We attempt to include the headers | |
| * only if they are available; otherwise we provide no-op fallbacks so that | |
| * builds without OpenSSL headers/libs still compile and link. | |
| */ | |
| #if defined(__has_include) | |
| # if __has_include(<openssl/err.h>) && __has_include(<openssl/crypto.h>) | |
| # include <openssl/err.h> | |
| # include <openssl/crypto.h> | |
| # define T2_HAVE_OPENSSL 1 | |
| # endif | |
| #endif | |
| #ifndef T2_HAVE_OPENSSL | |
| #define T2_HAVE_OPENSSL 0 | |
| /* No-op fallbacks when OpenSSL is not available */ | |
| static inline void t2_openssl_thread_stop_fallback(void) | |
| { | |
| /* Intentionally empty: OpenSSL not available */ | |
| } | |
| static inline void t2_openssl_err_clear_fallback(void) | |
| { | |
| /* Intentionally empty: OpenSSL not available */ | |
| } | |
| /* Map OpenSSL APIs to local no-op fallbacks when headers are absent. */ | |
| #ifndef OPENSSL_thread_stop | |
| #define OPENSSL_thread_stop() t2_openssl_thread_stop_fallback() | |
| #endif | |
| #ifndef ERR_clear_error | |
| #define ERR_clear_error() t2_openssl_err_clear_fallback() | |
| #endif | |
| #endif /* !T2_HAVE_OPENSSL */ |
Copilot
AI
Mar 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CURLOPT_UPLOAD_BUFFERSIZE is not available in older libcurl versions (as noted in the comment) and this call is currently unguarded. This will cause compile failures on platforms with older libcurl headers. Please wrap this option in an #ifdef CURLOPT_UPLOAD_BUFFERSIZE guard (similar to how CURLOPT_TCP_KEEPCNT is handled).
| // Limit the send buffer to 8KB (Requires libcurl 7.62.0+) | |
| CURL_SETOPT_CHECK(pool_entries[i].easy_handle, CURLOPT_UPLOAD_BUFFERSIZE, 8192L); | |
| // Limit the send buffer to 8KB (Requires libcurl 7.62.0+) | |
| #ifdef CURLOPT_UPLOAD_BUFFERSIZE | |
| CURL_SETOPT_CHECK(pool_entries[i].easy_handle, CURLOPT_UPLOAD_BUFFERSIZE, 8192L); | |
| #endif |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -44,21 +44,21 @@ static ActivationTimeoutCB activationTimeoutCb; | |||||
| static Vector *profileList = NULL; | ||||||
| static pthread_mutex_t scMutex; | ||||||
| static bool sc_initialized = false; | ||||||
| static bool islogdemand = false; | ||||||
| static bool isretainSeekmap = true; | ||||||
|
||||||
| static bool isretainSeekmap = true; | |
| static bool isretainSeekmap = false; |
Copilot
AI
Mar 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the interrupt path, when get_retainseekmap() is true you never reset it back to the default state (the previous code did set_logdemand(false) after consuming the on-demand flag). This causes subsequent non-on-demand LOG_UPLOAD interrupts to incorrectly retain seekmap. Consider resetting the flag after handling the retain case, and avoid setting it to true in the branch that calls timeoutNotificationCb(..., true) (that branch represents the clear-seekmap case).
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -181,13 +181,12 @@ void sig_handler(int sig, siginfo_t* info, void* uc) | |||||||
| else if ( sig == SIGUSR1 || sig == LOG_UPLOAD ) | ||||||||
| { | ||||||||
| T2Info(("LOG_UPLOAD received!\n")); | ||||||||
| set_logdemand(false); | ||||||||
| set_retainseekmap(false); | ||||||||
| ReportProfiles_Interrupt(); | ||||||||
| } | ||||||||
| else if (sig == LOG_UPLOAD_ONDEMAND || sig == SIGIO) | ||||||||
| { | ||||||||
| T2Info(("LOG_UPLOAD_ONDEMAND received!\n")); | ||||||||
|
||||||||
| T2Info(("LOG_UPLOAD_ONDEMAND received!\n")); | |
| T2Info(("LOG_UPLOAD_ONDEMAND received!\n")); | |
| set_retainseekmap(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling: “initialiation” → “initialization”.