mirror of
https://github.com/outbackdingo/parodus.git
synced 2026-01-28 02:20:02 +00:00
Compare commits
8 Commits
event_hand
...
parodus_de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f032d2ca30 | ||
|
|
9cfc734c51 | ||
|
|
153add9bec | ||
|
|
7679fdaf4a | ||
|
|
1c09a80493 | ||
|
|
bfad8ed44b | ||
|
|
8c576f8f48 | ||
|
|
dacac5fe8d |
@@ -169,11 +169,10 @@ void createSocketConnection(void (* initKeypress)())
|
||||
seshat_registered = __registerWithSeshat();
|
||||
}
|
||||
|
||||
// If interface down event is set, wait till interface is up again.
|
||||
if (get_interface_down_event ())
|
||||
if (0 != wait_while_interface_down ())
|
||||
break;
|
||||
|
||||
|
||||
if(get_close_retry())
|
||||
{
|
||||
ParodusInfo("close_retry is %d, hence closing the connection and retrying\n", get_close_retry());
|
||||
|
||||
@@ -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;
|
||||
@@ -610,7 +610,6 @@ int keep_trying_to_connect (create_connection_ctx_t *ctx,
|
||||
|
||||
if (rtn == CONN_WAIT_ACTION_RETRY) // if redirected or build_headers
|
||||
continue;
|
||||
|
||||
// If interface down event is set, stop retry
|
||||
// and wait till interface is up again.
|
||||
if(get_interface_down_event()) {
|
||||
@@ -626,7 +625,6 @@ int keep_trying_to_connect (create_connection_ctx_t *ctx,
|
||||
!= BACKOFF_DELAY_TAKEN) // shutdown or cond wait error
|
||||
return false;
|
||||
}
|
||||
|
||||
if (rtn == CONN_WAIT_RETRY_DNS)
|
||||
return false; //find_server again
|
||||
// else retry
|
||||
@@ -644,17 +642,15 @@ int wait_while_interface_down()
|
||||
set_global_conn(NULL);
|
||||
|
||||
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());
|
||||
|
||||
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)
|
||||
ParodusError
|
||||
("Error on pthread_cond_wait (%d) in wait_while_interface_down\n", rtn);
|
||||
if ((rtn != 0) || g_shutdown) {
|
||||
return -1;
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -700,7 +696,6 @@ int createNopollConnection(noPollCtx *ctx)
|
||||
set_current_server (&conn_ctx);
|
||||
if (keep_trying_to_connect (&conn_ctx, &backoff_timer))
|
||||
break;
|
||||
|
||||
// retry dns query
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ void __report_log (noPollCtx * ctx, noPollDebugLevel level, const char * log_msg
|
||||
|
||||
if (level == NOPOLL_LEVEL_DEBUG)
|
||||
{
|
||||
//ParodusPrint("%s\n", log_msg);
|
||||
ParodusInfo("%s\n", log_msg);
|
||||
}
|
||||
if (level == NOPOLL_LEVEL_INFO)
|
||||
{
|
||||
@@ -154,7 +154,7 @@ void __report_log (noPollCtx * ctx, noPollDebugLevel level, const char * log_msg
|
||||
}
|
||||
if (level == NOPOLL_LEVEL_WARNING)
|
||||
{
|
||||
ParodusPrint("%s\n", log_msg);
|
||||
ParodusInfo("%s\n", log_msg);
|
||||
}
|
||||
if (level == NOPOLL_LEVEL_CRITICAL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user