slackbuilds_ponce/network/aiccu/07_allow_tunnels.patch
David Spencer 4af65c01a9 network/aiccu: Patched to build with gnutls-3.4.
Signed-off-by: David Spencer <baildon.research@googlemail.com>
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2016-01-17 09:40:16 +07:00

61 lines
1.4 KiB
Diff

commit d7c4f7c0d34b80c188fa45228ca282fd8771a41d
Author: Norman Rasmussen <norman@rasmussen.co.za>
Date: Sun Jan 10 21:45:55 2010 +0000
Allow 'tunnels' mode when there's an already running instance.
diff --git a/unix-console/main.c b/unix-console/main.c
index 8a4d9a9..388d988 100755
--- a/unix-console/main.c
+++ b/unix-console/main.c
@@ -50,7 +50,7 @@ int sigrunning(int sig)
/* Close the file again */
fclose(f);
- /* If we can HUP it, it still runs */
+ /* If we can signal it, it still runs */
return (pid > 0 && kill(pid, sig) == 0 ? 1 : 0);
}
@@ -302,20 +302,6 @@ int main(int argc, char *argv[])
return -1;
}
-#ifndef _WIN32
- /* start or stop? */
- if ( mode != A_TEST &&
- mode != A_AUTOTEST)
- {
- /* Already running? */
- if (sigrunning(mode == A_STOP ? SIGTERM : 0) == 1)
- {
- dolog(LOG_ERR, "Already running instance HUP'ed, exiting\n");
- return 0;
- }
- }
-#endif
-
/* Verify required parameters */
if (!g_aiccu->username || !g_aiccu->password)
{
@@ -331,6 +317,20 @@ int main(int argc, char *argv[])
return ret == 0 ? -1 : 0;
}
+#ifndef _WIN32
+ /* start or stop? */
+ if ( mode != A_TEST &&
+ mode != A_AUTOTEST)
+ {
+ /* Already running? */
+ if (sigrunning(mode == A_STOP ? SIGTERM : 0) == 1)
+ {
+ dolog(LOG_ERR, "Already running instance signaled, exiting\n");
+ return 0;
+ }
+ }
+#endif
+
/* Get our tunnel */
hTunnel = get_tunnel();