mirror of
https://github.com/dschmenk/apple2pi.git
synced 2024-06-14 03:29:33 +00:00
Change file properties to not execute, move socket creatio after sync
in a2pid.c
This commit is contained in:
parent
474ad076c3
commit
c27596aac7
0
src/A2PI.PO
Executable file → Normal file
0
src/A2PI.PO
Executable file → Normal file
2
src/Makefile
Executable file → Normal file
2
src/Makefile
Executable file → Normal file
|
@ -1,4 +1,4 @@
|
||||||
BIN=a2pid a2mon dskread dskwrite bintomon
|
BIN=a2serclk a2pid a2mon dskread dskwrite bintomon
|
||||||
|
|
||||||
all: $(BIN)
|
all: $(BIN)
|
||||||
|
|
||||||
|
|
0
src/a2lib.c
Executable file → Normal file
0
src/a2lib.c
Executable file → Normal file
0
src/a2mon.c
Executable file → Normal file
0
src/a2mon.c
Executable file → Normal file
32
src/a2pid.c
Executable file → Normal file
32
src/a2pid.c
Executable file → Normal file
|
@ -662,22 +662,6 @@ void main(int argc, char **argv)
|
||||||
evrely.type = EV_REL;
|
evrely.type = EV_REL;
|
||||||
evrely.code = REL_Y;
|
evrely.code = REL_Y;
|
||||||
evsync.type = EV_SYN;
|
evsync.type = EV_SYN;
|
||||||
/*
|
|
||||||
* Open socket.
|
|
||||||
*/
|
|
||||||
prlog("a2pid: Open server socket\n");
|
|
||||||
bzero(&servaddr, sizeof(servaddr));
|
|
||||||
servaddr.sin_family = AF_INET;
|
|
||||||
servaddr.sin_port = htons(6502);
|
|
||||||
servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
|
|
||||||
srvfd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
|
|
||||||
if (srvfd < 0)
|
|
||||||
die("error: socket create");
|
|
||||||
if (bind(srvfd,(struct sockaddr *)&servaddr, sizeof(servaddr)) < 0)
|
|
||||||
die("error: bind socket");
|
|
||||||
if (listen(srvfd, 1) < 0)
|
|
||||||
die("error: listen socket");
|
|
||||||
reqfd = 0;
|
|
||||||
/*
|
/*
|
||||||
* Open serial port.
|
* Open serial port.
|
||||||
*/
|
*/
|
||||||
|
@ -720,6 +704,22 @@ void main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
newtio.c_cc[VMIN] = 3; /* blocking read until 3 chars received */
|
newtio.c_cc[VMIN] = 3; /* blocking read until 3 chars received */
|
||||||
tcsetattr(a2fd, TCSANOW, &newtio);
|
tcsetattr(a2fd, TCSANOW, &newtio);
|
||||||
|
/*
|
||||||
|
* Open socket.
|
||||||
|
*/
|
||||||
|
prlog("a2pid: Open server socket\n");
|
||||||
|
bzero(&servaddr, sizeof(servaddr));
|
||||||
|
servaddr.sin_family = AF_INET;
|
||||||
|
servaddr.sin_port = htons(6502);
|
||||||
|
servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||||
|
srvfd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||||
|
if (srvfd < 0)
|
||||||
|
die("error: socket create");
|
||||||
|
if (bind(srvfd,(struct sockaddr *)&servaddr, sizeof(servaddr)) < 0)
|
||||||
|
die("error: bind socket");
|
||||||
|
if (listen(srvfd, 1) < 0)
|
||||||
|
die("error: listen socket");
|
||||||
|
reqfd = 0;
|
||||||
FD_ZERO(&openset);
|
FD_ZERO(&openset);
|
||||||
FD_SET(a2fd, &openset);
|
FD_SET(a2fd, &openset);
|
||||||
FD_SET(srvfd, &openset);
|
FD_SET(srvfd, &openset);
|
||||||
|
|
0
src/a2slideshow.mon
Executable file → Normal file
0
src/a2slideshow.mon
Executable file → Normal file
0
src/bintomon.c
Executable file → Normal file
0
src/bintomon.c
Executable file → Normal file
0
src/dskread.c
Executable file → Normal file
0
src/dskread.c
Executable file → Normal file
0
src/dskwrite.c
Executable file → Normal file
0
src/dskwrite.c
Executable file → Normal file
Loading…
Reference in New Issue
Block a user