Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/comms/echolinux/files/patch-echolinux_control.c
16461 views
1
--- echolinux/control.c.orig 2006-02-24 19:28:15 UTC
2
+++ echolinux/control.c
3
@@ -12,6 +12,7 @@ $Log$
4
5
#include <stdio.h>
6
#include <stdlib.h>
7
+#include <ctype.h>
8
#include <sys/ioctl.h>
9
#include <sys/soundcard.h>
10
#include <sys/types.h>
11
@@ -44,7 +45,7 @@ int outControlSocket, inControlSocket;
12
int connectTimeout, sdesLength;
13
struct hostent *hp;
14
char *remoteNode = NULL;
15
-struct timeval timeout;
16
+static struct timeval timeout;
17
18
int connected = 0, atemptingConnect = 0, quit = 0;
19
pid_t audioPid;
20
@@ -130,7 +131,7 @@ int makeConnection(char *host){
21
close(audioInPipe[1]);
22
close(audioInPipe[0]);
23
24
- execlp("echoaudio", "echoaudio", remoteNode, callsign, 0);
25
+ execlp("echoaudio", "echoaudio", remoteNode, callsign, NULL);
26
perror("echoaudio");
27
exit(1);
28
}
29
@@ -179,12 +180,12 @@ int makeConnection(char *host){
30
connectTimeout = 0;
31
timeout.tv_sec = 10;
32
timeout.tv_usec = 0;
33
-
34
+ return(1);
35
}
36
37
/**** disconnect from remote node *********/
38
39
-int disconnect(int sendBye){
40
+static void disconnect(int sendBye){
41
42
int i, length;
43
unsigned char *bye;
44
@@ -258,7 +259,8 @@ void readStdin(void){
45
46
int main(int argc, char *argv[]){
47
48
- int length, i, len_inet;
49
+ int length, i;
50
+ socklen_t len_inet;
51
char c, remoteName[40], line[80], *home;
52
struct rtcp_sdes_request sdesItems;
53
54
@@ -277,7 +279,7 @@ int main(int argc, char *argv[]){
55
strcat(line, "/.echoLinux/userdata.txt");
56
userData = fopen(line, "r");
57
if(userData == NULL){
58
- userData = fopen("/etc/echolinux/userdata.txt", "r");
59
+ userData = fopen("%%LOCALBASE%%/etc/echolinux/userdata.txt", "r");
60
if(userData == NULL){
61
perror("userData");
62
exit(1);
63
64