Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 602614 Details for
Bug 844607
aiccu treats lack of network connectivity on startup as a fatal error
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to retry TIC network connection on net outtage
aiccu-20070115-retry-on-network-outage.diff (text/plain), 3.13 KB, created by
Conrad Meyer
on 2012-08-07 01:19:38 UTC
(
hide
)
Description:
Patch to retry TIC network connection on net outtage
Filename:
MIME Type:
Creator:
Conrad Meyer
Created:
2012-08-07 01:19:38 UTC
Size:
3.13 KB
patch
obsolete
>diff -urN aiccu.orig/common/tic.c aiccu/common/tic.c >--- aiccu.orig/common/tic.c 2007-01-11 05:41:31.000000000 -0800 >+++ aiccu/common/tic.c 2012-08-06 18:11:40.937495012 -0700 >@@ -60,7 +60,7 @@ > return 0; > } > >-bool tic_Login(struct TIC_conf *tic, const char *username, const char *password, const char *server) >+bool tic_Login(struct TIC_conf *tic, const char *username, const char *password, const char *server, bool test_mode) > { > char buf[1024], sSignature[33], sChallenge[1024]; > int i; >@@ -76,11 +76,23 @@ > D(dolog(LOG_DEBUG, "Trying to connect to TIC server %s\n", server)); > > /* Connect to the TIC server */ >- tic->sock = connect_client(server, TIC_PORT, AF_INET, SOCK_STREAM); >- if (!tic->sock) >- { >+ while (true) { >+ tic->sock = connect_client(server, TIC_PORT, AF_INET, SOCK_STREAM); >+ if (tic->sock) >+ break; >+ > dolog(LOG_ERR, "Couldn't connect to the TIC server %s\n", server); >- return false; >+ >+ if (test_mode) >+ return false; >+ >+ /* >+ * CEM: if connect_client() fails, the client was unable to >+ * resolve TIC or connect(2) failed. Since we haven't yet >+ * talked to the TIC server across the network, this shouldn't >+ * possibly ddos sixxs. >+ */ >+ sleep(15); > } > > /* Fetch the welcome */ >diff -urN aiccu.orig/common/tic.h aiccu/common/tic.h >--- aiccu.orig/common/tic.h 2006-12-21 06:08:50.000000000 -0800 >+++ aiccu/common/tic.h 2012-08-06 18:11:40.937495012 -0700 >@@ -120,7 +120,7 @@ > **********************************************************/ > > /* Login to/Logout from the TIC Server */ >-bool tic_Login(struct TIC_conf *tic, const char *username, const char *password, const char *server); >+bool tic_Login(struct TIC_conf *tic, const char *username, const char *password, const char *server, bool test_mode); > void tic_Logout(struct TIC_conf *tic, const char *quitmsg); > > /* Check if the time is in range */ >diff -urN aiccu.orig/unix-console/main.c aiccu/unix-console/main.c >--- aiccu.orig/unix-console/main.c 2007-01-15 03:57:34.000000000 -0800 >+++ aiccu/unix-console/main.c 2012-08-06 18:13:04.184559235 -0700 >@@ -77,7 +77,7 @@ > { > struct TIC_sTunnel *hsTunnel, *t; > >- if (!tic_Login(g_aiccu->tic, g_aiccu->username, g_aiccu->password, g_aiccu->server)) return 0; >+ if (!tic_Login(g_aiccu->tic, g_aiccu->username, g_aiccu->password, g_aiccu->server, true/*test_mode=no retry*/)) return 0; > > hsTunnel = tic_ListTunnels(g_aiccu->tic); > >@@ -147,15 +147,16 @@ > * returns a TIC_Tunnel which can then be > * used for configuring and keeping it running > */ >-struct TIC_Tunnel *get_tunnel(void); >-struct TIC_Tunnel *get_tunnel(void) >+struct TIC_Tunnel *get_tunnel(bool); >+struct TIC_Tunnel *get_tunnel(bool test_mode) > { > > struct TIC_sTunnel *hsTunnel, *t; > struct TIC_Tunnel *hTunnel; > > /* Login to the TIC Server */ >- if (!tic_Login(g_aiccu->tic, g_aiccu->username, g_aiccu->password, g_aiccu->server)) return NULL; >+ if (!tic_Login(g_aiccu->tic, g_aiccu->username, g_aiccu->password, g_aiccu->server, test_mode)) >+ return NULL; > > /* > * Don't try to list the tunnels when >@@ -332,7 +333,7 @@ > } > > /* Get our tunnel */ >- hTunnel = get_tunnel(); >+ hTunnel = get_tunnel((mode == A_TEST || mode == A_AUTOTEST)); > > if (!hTunnel) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 844607
:
602614
|
602615
|
602791
|
602794
|
603220
|
713303
|
714220
|
935170