mirror of
https://github.com/outbackdingo/parodus.git
synced 2026-01-28 10:20:04 +00:00
Compare commits
9 Commits
event_hand
...
4.1_pb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d52c4c2a43 | ||
|
|
9cfc734c51 | ||
|
|
153add9bec | ||
|
|
7679fdaf4a | ||
|
|
1c09a80493 | ||
|
|
bfad8ed44b | ||
|
|
c7c6fb4926 | ||
|
|
f4b2c252ae | ||
|
|
8794ce2092 |
@@ -22,7 +22,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- Update retry timestamp in connection-health-file
|
||||
- fix so that parodus can be killed, even if in a connection fail loop
|
||||
- provide signal handlers so we shut down properly when INCLUDE_BREAKPAD active
|
||||
- send status code and reason in websocket close message
|
||||
- send status code and reason in websocket close message
|
||||
- dont try to install handler for signal 9
|
||||
|
||||
## [1.0.2] - 2019-02-08
|
||||
- Refactored connection.c and updated corresponding unit tests
|
||||
|
||||
@@ -509,7 +509,7 @@ int wait_connection_ready (create_connection_ctx_t *ctx)
|
||||
if(wait_status == 307 || wait_status == 302 || wait_status == 303) // only when there is a http redirect
|
||||
{
|
||||
char *redirect_ptr = redirectURL;
|
||||
ParodusError("Received temporary redirection response message %s\n", redirectURL);
|
||||
ParodusInfo("Received temporary redirection response message %s\n", redirectURL);
|
||||
// Extract server Address and port from the redirectURL
|
||||
if (strncmp (redirect_ptr, "Redirect:", 9) == 0)
|
||||
redirect_ptr += 9;
|
||||
@@ -641,18 +641,17 @@ int wait_while_interface_down()
|
||||
close_and_unref_connection (get_global_conn());
|
||||
set_global_conn(NULL);
|
||||
|
||||
pthread_mutex_lock(get_interface_down_mut());
|
||||
while (!get_interface_down_event ()) {
|
||||
while (get_interface_down_event ()) {
|
||||
pthread_mutex_lock(get_interface_down_mut());
|
||||
rtn = pthread_cond_wait(get_interface_down_con(), get_interface_down_mut());
|
||||
pthread_mutex_unlock (get_interface_down_mut());
|
||||
if (rtn != 0)
|
||||
ParodusError
|
||||
("Error on pthread_cond_wait (%d) in wait_while_interface_down\n", rtn);
|
||||
if ((rtn != 0) || g_shutdown) {
|
||||
pthread_mutex_unlock (get_interface_down_mut());
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock (get_interface_down_mut());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -746,6 +745,10 @@ int createNopollConnection(noPollCtx *ctx)
|
||||
static char* build_extra_headers( const char *auth, const char *device_id,
|
||||
const char *user_agent, const char *convey )
|
||||
{
|
||||
ParodusInfo("auth token: %s\n", (NULL != auth) ? auth: "");
|
||||
ParodusInfo("device_id: %s\n", device_id);
|
||||
ParodusInfo("user_agent: %s\n", user_agent);
|
||||
ParodusInfo("convey: %s\n", convey);
|
||||
return nopoll_strdup_printf(
|
||||
"%s%s"
|
||||
"\r\nX-WebPA-Device-Name: %s"
|
||||
@@ -785,6 +788,10 @@ static noPollConnOpts * createConnOpts (char * extra_headers, bool secure)
|
||||
}
|
||||
nopoll_conn_opts_set_interface (opts,get_parodus_cfg()->webpa_interface_used);
|
||||
nopoll_conn_opts_set_extra_headers (opts,extra_headers);
|
||||
ParodusInfo("nopoll_conn_opts_set_extra_headers, len %d, value: %s\n", strlen(extra_headers), extra_headers);
|
||||
FILE *fp = fopen("/tmp/parodus_extra_headers.txt", "w");
|
||||
fprintf(fp, "%s", extra_headers);
|
||||
fclose(fp);
|
||||
return opts;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ int main( int argc, char **argv)
|
||||
signal(SIGINT, sig_handler);
|
||||
signal(SIGUSR1, sig_handler);
|
||||
signal(SIGUSR2, sig_handler);
|
||||
signal(SIGKILL, sig_handler);
|
||||
signal(SIGQUIT, sig_handler);
|
||||
signal(SIGHUP, sig_handler);
|
||||
signal(SIGALRM, sig_handler);
|
||||
|
||||
Reference in New Issue
Block a user