aboutsummaryrefslogtreecommitdiffstats
path: root/comms/echolinux
diff options
context:
space:
mode:
authorvs <vs@FreeBSD.org>2005-03-17 22:10:03 +0800
committervs <vs@FreeBSD.org>2005-03-17 22:10:03 +0800
commit03d6277a5b6422602c6368f72958eadde6aeff47 (patch)
tree80c5191c521decf3ec8217cc9be80d5dbc64b02b /comms/echolinux
parentd01c856f2bef3927e594f5419442f61f2a202d65 (diff)
downloadfreebsd-ports-gnome-03d6277a5b6422602c6368f72958eadde6aeff47.tar.gz
freebsd-ports-gnome-03d6277a5b6422602c6368f72958eadde6aeff47.tar.zst
freebsd-ports-gnome-03d6277a5b6422602c6368f72958eadde6aeff47.zip
Bug in code meant it would timeout as it would not reply to a
"heartbeat" check. There is no way the original linux version would work properly without this code. PR: ports/78574 Submitted by: Diane Bruce (maintainer)
Diffstat (limited to 'comms/echolinux')
-rw-r--r--comms/echolinux/Makefile2
-rw-r--r--comms/echolinux/files/patch-echolinux_control.c84
2 files changed, 84 insertions, 2 deletions
diff --git a/comms/echolinux/Makefile b/comms/echolinux/Makefile
index 2836c697454e..333905ed5701 100644
--- a/comms/echolinux/Makefile
+++ b/comms/echolinux/Makefile
@@ -7,7 +7,7 @@
PORTNAME= echolinux
PORTVERSION= 0.16a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= comms
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= cqinet
diff --git a/comms/echolinux/files/patch-echolinux_control.c b/comms/echolinux/files/patch-echolinux_control.c
index c1645e7e1ac2..98201ab20344 100644
--- a/comms/echolinux/files/patch-echolinux_control.c
+++ b/comms/echolinux/files/patch-echolinux_control.c
@@ -1,5 +1,14 @@
--- echolinux/control.c.orig Mon Feb 2 22:29:46 2004
-+++ echolinux/control.c Fri Jul 2 00:58:38 2004
++++ echolinux/control.c Mon Mar 7 15:52:46 2005
+@@ -13,7 +13,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/ioctl.h>
+-#include <linux/soundcard.h>
++#include <sys/soundcard.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
@@ -24,7 +24,8 @@
#include <arpa/inet.h>
#include <netdb.h>
@@ -10,3 +19,76 @@
#include <signal.h>
#include <string.h>
#include <sys/time.h>
+@@ -354,7 +355,7 @@
+ timeout.tv_sec = 10;
+ timeout.tv_usec = 0;
+ }
+-
++
+ if((i == 0) && (audioPid > 0)){ // timeout & connected
+ connectTimeout++;
+ if(connectTimeout == CONNECT_TRY){
+@@ -388,28 +389,32 @@
+ disconnect(FALSE);
+ }
+ if(isRTCPSdespacket(inBuffer, length)){
+- if((audioPid > 0) &&
+- (inAddr.sin_addr.s_addr == destAddr.sin_addr.s_addr)){
+- sdesItems.nitems = 1;
+- sdesItems.item[0].r_item = RTCP_SDES_NAME;
+- sdesItems.item[0].r_text = NULL;
+- remoteName[0] = 0;
+- parseSDES(inBuffer, &sdesItems);
+- if(sdesItems.item[0].r_text != NULL){
+- copySDESitem(sdesItems.item[0].r_text, &remoteName[2]);
+- }
+- remoteName[0] = CONNECT;
+- remoteName[1] = ' ';
+- puts(remoteName);
+- if(atemptingConnect){
+- atemptingConnect = 0;
+- fputs("P connect.wav\n", audioOutFd);
+- fputs("I\n", audioOutFd);
+- }
+- connectTimeout = 0; // reset the counter
+- }
+- else {
+- if(audioPid<=0){
++ if (audioPid > 0) {
++ sendto(outControlSocket,
++ *sdesPacket,
++ sdesLength,
++ 0,
++ (struct sockaddr *)&destAddr,
++ sizeof destAddr);
++ if(inAddr.sin_addr.s_addr == destAddr.sin_addr.s_addr){
++ sdesItems.nitems = 1;
++ sdesItems.item[0].r_item = RTCP_SDES_NAME;
++ sdesItems.item[0].r_text = NULL;
++ remoteName[0] = 0;
++ parseSDES(inBuffer, &sdesItems);
++ if(sdesItems.item[0].r_text != NULL){
++ copySDESitem(sdesItems.item[0].r_text, &remoteName[2]);
++ }
++ remoteName[0] = CONNECT;
++ remoteName[1] = ' ';
++ puts(remoteName);
++ if(atemptingConnect){
++ atemptingConnect = 0;
++ fputs("P connect.wav\n", audioOutFd);
++ fputs("I\n", audioOutFd);
++ }
++ connectTimeout = 0; // reset the counter
++ } else { /* audioPid <= 0 */
+ sdesItems.nitems = 1;
+ sdesItems.item[0].r_item = RTCP_SDES_NAME;
+ sdesItems.item[0].r_text = NULL;
+@@ -424,8 +429,6 @@
+ makeConnection(inet_ntoa(inAddr.sin_addr));
+ fputs("P connect.wav\n", audioOutFd);
+ fputs("I\n", audioOutFd);
+- }
+- else {
+ }
+ }
+ }