summaryrefslogtreecommitdiff
path: root/comms/echolinux/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-07-04 23:28:32 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-07-04 23:28:32 +0000
commitb764749dc7ba4198709de1e40b66ebda8af8e75b (patch)
treeae6a68b4db9c757974eb0263b92f0e28e4cc4e73 /comms/echolinux/files
parentPlease welcome erwin to the ports tree. (diff)
Add echolinux, an EchoLink client for UNIX.
PR: ports/68587 Submitted by: Diane Bruce <db@night.db.net>
Notes
Notes: svn path=/head/; revision=112929
Diffstat (limited to 'comms/echolinux/files')
-rw-r--r--comms/echolinux/files/patch-echogui_servercode.c64
-rw-r--r--comms/echolinux/files/patch-echogui_testgui.c10
-rw-r--r--comms/echolinux/files/patch-echogui_testgui_cb.c34
-rw-r--r--comms/echolinux/files/patch-echogui_testgui_main.c14
-rw-r--r--comms/echolinux/files/patch-echolinux_control.c12
-rw-r--r--comms/echolinux/files/patch-echolinux_echolinux.h30
-rw-r--r--comms/echolinux/files/patch-echolinux_vox.c11
7 files changed, 175 insertions, 0 deletions
diff --git a/comms/echolinux/files/patch-echogui_servercode.c b/comms/echolinux/files/patch-echogui_servercode.c
new file mode 100644
index 000000000000..5a0ca98d7f5d
--- /dev/null
+++ b/comms/echolinux/files/patch-echogui_servercode.c
@@ -0,0 +1,64 @@
+--- echogui/servercode.c.orig Tue Feb 3 04:48:41 2004
++++ echogui/servercode.c Mon Jul 5 00:11:42 2004
+@@ -216,22 +216,13 @@
+
+ serverFd = fdopen(serverSocket, "r");
+
+- memset(sendBuf, 0x6c, 1);
+- result = write(serverSocket, sendBuf, 1);
+-
+ /* Get the local time */
+ (void) time(&theTime);
+ tm_ptr = localtime(&theTime);
+ strftime(logTime, 6, "%H:%M", tm_ptr);
+
+- strcpy(sendBuf, callsign);
+- strcat(sendBuf,"\254\254");
+- strcat(sendBuf, password);
+- strcat(sendBuf, "\015ONLINE3.38(");
+- strcat(sendBuf, logTime);
+- strcat(sendBuf, ")\015");
+- strcat(sendBuf,location);
+- strcat(sendBuf,"\015");
++ sprintf(sendBuf,"\x6c%s\xac\xac%s\rONLINE3.38(%s)\r%s\r",
++ callsign, password, logTime, location);
+
+ result = write(serverSocket, sendBuf, strlen(sendBuf));
+
+@@ -677,33 +668,9 @@
+ }
+
+ if(FD_ISSET(serverSocket, &testWriteFds)){
+- doTimeout = 0;
+- (void) time(&theTime);
+- tm_ptr = localtime(&theTime);
+- strftime(logTime, 20, "%H:%M:%S", tm_ptr);
+- i = connect(serverSocket, (struct sockaddr *) &adr_srvr,len_inet);
+- // printf("Connect returned a %d, errno = %s\n", i, strerror(errno));
+- if(i){
+- // printf("%s serverSocket has an error, %d: %s.\n",
+- // logTime, errno, strerror(errno));
+- FD_CLR(serverSocket, &exceptFds);
+- FD_CLR(serverSocket, &writeFds);
+- close(serverSocket);
+- serverPortState == CLOSED;
+- if(serverShutdown)
+- quit = 1;
+- else{
+- pServerCurrent = pServerCurrent->next;
+- openSocket();
+- }
+- }
+- else{
+- //printf("%s Cool, no error, server on socket %d.\n",
+- // logTime, serverSocket);
+- serverPortState = CONNECTED;
+- FD_CLR(serverSocket, &writeFds);
+- serverTask();
+- }
++ serverPortState = CONNECTED;
++ FD_CLR(serverSocket, &writeFds);
++ serverTask();
+ }
+
+ if(serverState != IDLE){
diff --git a/comms/echolinux/files/patch-echogui_testgui.c b/comms/echolinux/files/patch-echogui_testgui.c
new file mode 100644
index 000000000000..f00f1913ebf6
--- /dev/null
+++ b/comms/echolinux/files/patch-echogui_testgui.c
@@ -0,0 +1,10 @@
+--- echogui/testgui.c.orig Thu Feb 12 14:59:29 2004
++++ echogui/testgui.c Fri Jul 2 00:57:53 2004
+@@ -1,6 +1,6 @@
+ /* Form definition file generated with fdesign. */
+
+-#include "forms.h"
++#include <X11/forms.h>
+ #include <stdlib.h>
+ #include "testgui.h"
+
diff --git a/comms/echolinux/files/patch-echogui_testgui_cb.c b/comms/echolinux/files/patch-echogui_testgui_cb.c
new file mode 100644
index 000000000000..706e1e6ab09f
--- /dev/null
+++ b/comms/echolinux/files/patch-echogui_testgui_cb.c
@@ -0,0 +1,34 @@
+--- echogui/testgui_cb.c.orig Tue Feb 3 03:28:03 2004
++++ echogui/testgui_cb.c Mon Jul 5 00:14:13 2004
+@@ -14,9 +14,10 @@
+ #include <linux/soundcard.h>
+ #include <sys/ioctl.h>
+ #include <fcntl.h>
+-#include <forms.h>
++#include <X11/forms.h>
+ #include <math.h>
+ #include <signal.h>
++#include <pthread.h>
+
+ #include "testgui.h"
+ #include "serverglobals.h"
+@@ -345,6 +346,7 @@
+ {
+ int error;
+ char line[3];
++ struct timeval timenow;
+ struct timespec timeout;
+
+ // kill(controlPid, SIGKILL);
+@@ -354,8 +356,9 @@
+ line[1] = '\n';
+ write(controlOutPipe[1], line, 2);
+
+- gettimeofday(&timeout);
+- timeout.tv_sec += 5;
++ gettimeofday(&timenow, NULL);
++ timeout.tv_sec = timenow.tv_sec + 5;
++ timeout.tv_nsec = 0;
+ pthread_mutex_lock(&serverLoggedOffLock);
+ sendServerCommand(LOGOFF);
+ pthread_cond_timedwait(&serverLoggedOff,
diff --git a/comms/echolinux/files/patch-echogui_testgui_main.c b/comms/echolinux/files/patch-echogui_testgui_main.c
new file mode 100644
index 000000000000..0d38fe396706
--- /dev/null
+++ b/comms/echolinux/files/patch-echogui_testgui_main.c
@@ -0,0 +1,14 @@
+--- echogui/testgui_main.c.orig Sun Feb 15 11:33:04 2004
++++ echogui/testgui_main.c Fri Jul 2 00:59:18 2004
+@@ -16,9 +16,10 @@
+ #include <linux/soundcard.h>
+ #include <sys/ioctl.h>
+ #include <fcntl.h>
+-#include <forms.h>
++#include <X11/forms.h>
+ #include <string.h>
+ #include <math.h>
++#include <pthread.h>
+
+ #include "testgui.h"
+ #include "serverglobals.h"
diff --git a/comms/echolinux/files/patch-echolinux_control.c b/comms/echolinux/files/patch-echolinux_control.c
new file mode 100644
index 000000000000..c1645e7e1ac2
--- /dev/null
+++ b/comms/echolinux/files/patch-echolinux_control.c
@@ -0,0 +1,12 @@
+--- echolinux/control.c.orig Mon Feb 2 22:29:46 2004
++++ echolinux/control.c Fri Jul 2 00:58:38 2004
+@@ -24,7 +24,8 @@
+ #include <arpa/inet.h>
+ #include <netdb.h>
+ #include <errno.h>
+-#include <wait.h>
++#include <sys/types.h>
++#include <sys/wait.h>
+ #include <signal.h>
+ #include <string.h>
+ #include <sys/time.h>
diff --git a/comms/echolinux/files/patch-echolinux_echolinux.h b/comms/echolinux/files/patch-echolinux_echolinux.h
new file mode 100644
index 000000000000..5e90f9f61795
--- /dev/null
+++ b/comms/echolinux/files/patch-echolinux_echolinux.h
@@ -0,0 +1,30 @@
+--- echolinux/echolinux.h.orig Sun Dec 22 04:11:34 2002
++++ echolinux/echolinux.h Mon Jul 5 00:16:32 2004
+@@ -11,22 +11,17 @@
+ #define PORT_BASE 5198
+
+
+-struct termio term_params, old_term_params;
++struct termios term_params, old_term_params;
+
+ void raw_tty(int flag){
+
+ if(flag){
+- ioctl(fileno(stdin), TCGETA, &old_term_params);
++ tcgetattr(fileno(stdin), &old_term_params);
+ term_params = old_term_params;
+- term_params.c_iflag &= ~(ICRNL|IXON|IXOFF); /* no cr translation */
+- term_params.c_iflag &= ~(ISTRIP); /* no stripping of high order bit */
+- term_params.c_oflag &= ~(OPOST); /* no output processing */
+- term_params.c_lflag &= ~(ISIG|ICANON|ECHO); /* raw mode */
+- term_params.c_cc[VMIN] = 0; /* satisfy read after 1 char */
+- term_params.c_cc[VTIME] = 0; /* satisfy read after 1 char */
+- ioctl(fileno(stdin), TCSETAF, &term_params);
++ cfmakeraw(&term_params);
++ tcsetattr(fileno(stdin), TCSAFLUSH, &term_params);
+ } else{
+- ioctl(fileno(stdin), TCSETAF, &old_term_params);
++ tcsetattr(fileno(stdin), TCSAFLUSH, &old_term_params);
+ }
+ }
+
diff --git a/comms/echolinux/files/patch-echolinux_vox.c b/comms/echolinux/files/patch-echolinux_vox.c
new file mode 100644
index 000000000000..1d0e83647de6
--- /dev/null
+++ b/comms/echolinux/files/patch-echolinux_vox.c
@@ -0,0 +1,11 @@
+--- echolinux/vox.c.orig Tue Feb 3 01:12:09 2004
++++ echolinux/vox.c Fri Jul 2 00:58:47 2004
+@@ -546,7 +546,7 @@
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+ for(i=0;i<4;i++){
+- temp = &(voicePacket->data);
++ temp = (unsigned char *)&(voicePacket->data);
+ gsm_decode(gsmh, temp+(i*33), sbuff);
+ ioctl(audiofd, SNDCTL_DSP_GETOSPACE, &info);
+ while(info.bytes < 320){