aboutsummaryrefslogtreecommitdiff
path: root/src/sman
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-08-19 22:34:56 +0000
committerdos-reis <gdr@axiomatics.org>2008-08-19 22:34:56 +0000
commit3fe344d2eb5c1155ecccd85fe6a994276c5f0cdb (patch)
tree874a5f2495a475f2451fa3e5d286b296140aab8b /src/sman
parentee89a54eb72128aa7c4655d12a5c5e9a97858172 (diff)
downloadopen-axiom-3fe344d2eb5c1155ecccd85fe6a994276c5f0cdb.tar.gz
* include/open-axiom.h (oa_buffer_address): New macro.
* sman/session.c (read_from_spad_io): Use It. (accept_session_connection): Likewise. (read_from_session): Likewise. * sman/sman.c (read_from_spad_io): Likewise. (read_from_manager): Likewise. (exec_command_env): Explicitly cast the null pointer to char*.
Diffstat (limited to 'src/sman')
-rw-r--r--src/sman/session.c14
-rw-r--r--src/sman/sman.c7
2 files changed, 12 insertions, 9 deletions
diff --git a/src/sman/session.c b/src/sman/session.c
index 3aacb787..4addf254 100644
--- a/src/sman/session.c
+++ b/src/sman/session.c
@@ -274,11 +274,12 @@ static void
read_from_spad_io(void)
{
int ret_code;
- ret_code = sread(spad_io, big_bad_buf, BufSize, "session: stdout socket");
+ ret_code = sread(spad_io, oa_buffer_address(big_bad_buf), BufSize,
+ "session: stdout socket");
if (ret_code == -1) return;
if(active_session != (openaxiom_sio *) 0) {
- ret_code = swrite(active_session, big_bad_buf, ret_code,
- NULL);
+ ret_code = swrite(active_session, oa_buffer_address(big_bad_buf),
+ ret_code, NULL);
}
}
@@ -350,7 +351,8 @@ accept_session_connection(openaxiom_sio *server_sock)
plSock->Socket.frame = get_int(spad_server);
active_session = (openaxiom_sio *)plSock;
get_string_buf(spad_server, big_bad_buf, BufSize);
- ret_code = swrite((openaxiom_sio *)plSock, big_bad_buf,
+ ret_code = swrite((openaxiom_sio *)plSock,
+ oa_buffer_address(big_bad_buf),
strlen(big_bad_buf)+1,
"session: writing to InterpWindow");
if (ret_code == -1)
@@ -373,14 +375,14 @@ read_from_session(openaxiom_sio *sock)
send_int(spad_server, sock->frame);
}
active_session = sock;
- ret_code = sread(sock, big_bad_buf, BufSize,
+ ret_code = sread(sock, oa_buffer_address(big_bad_buf), BufSize,
"session: reading InterpWindow");
if (ret_code == -1) {
active_session = (openaxiom_sio *) 0;
reading_output = 0;
return;
}
- ret_code = swrite(spad_io, big_bad_buf, ret_code,
+ ret_code = swrite(spad_io, oa_buffer_address(big_bad_buf), ret_code,
"session: writing SessionIO");
if (ret_code == -1) {
active_session = (openaxiom_sio *)0 ;
diff --git a/src/sman/sman.c b/src/sman/sman.c
index a92980b8..c7b5aa62 100644
--- a/src/sman/sman.c
+++ b/src/sman/sman.c
@@ -403,7 +403,7 @@ exec_command_env(char *command,char ** env)
{
char new_command[512];
sprintf(new_command, "exec %s", command);
- execle("/bin/sh","/bin/sh", "-c", new_command, 0, env);
+ execle("/bin/sh","/bin/sh", "-c", new_command, (char*)NULL, env);
}
static SpadProcess *
@@ -611,7 +611,7 @@ read_from_spad_io(int ptcNum)
}
}
else
- ret_code = swrite(session_io, big_bad_buf, ret_code,
+ ret_code = swrite(session_io, oa_buffer_address(big_bad_buf), ret_code,
"writing to session man");
if (ret_code == -1) {
perror("writing output to session manager");
@@ -624,7 +624,8 @@ static void
read_from_manager(int ptcNum)
{
int ret_code;
- ret_code = sread(session_io, big_bad_buf, BufSize, "reading session io");
+ ret_code = sread(session_io, oa_buffer_address(big_bad_buf), BufSize,
+ "reading session io");
if (ret_code == -1) {
return;
}