commit 267c56c41afbee3923e5f4127acd436c4eb9c44f
parent edf96a7ce3c34448be3250ad0a0137f7ab951ca8
Author: sin <sin@2f30.org>
Date: Fri, 24 Oct 2014 14:30:40 +0100
Use (none, pending, active) instead of (0, 1, 2)
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/README b/README
@@ -41,7 +41,7 @@ to help explain the semantics of the individual files.
|-- 0A734CBA717CEB7883D.... # friend's ID excluding nospam + checksum
| |-- call_in # 'arecord -r 48000 -c 1 -f S16_LE > call_in' to initiate a call
| |-- call_out # 'aplay -r 48000 -c 1 -f S16_LE - < call_out' to answer a call
-| |-- call_state # 0 if there's no call, 1 if call is pending and 2 if call is active
+| |-- call_state # (none, pending, active)
| |-- file_in # 'cat foo > file_in' to send a file
| |-- file_out # 'cat file_out > bar' to receive a file
| |-- file_pending # contains filename if transfer pending, empty otherwise
diff --git a/ratox.c b/ratox.c
@@ -396,7 +396,7 @@ cbcallinvite(void *av, int32_t cnum, void *udata)
ftruncate(f->fd[FCALL_STATE], 0);
lseek(f->fd[FCALL_STATE], 0, SEEK_SET);
- dprintf(f->fd[FCALL_STATE], "1\n");
+ dprintf(f->fd[FCALL_STATE], "pending\n");
}
static void
@@ -431,7 +431,7 @@ cbcallstart(void *av, int32_t cnum, void *udata)
ftruncate(f->fd[FCALL_STATE], 0);
lseek(f->fd[FCALL_STATE], 0, SEEK_SET);
- dprintf(f->fd[FCALL_STATE], "2\n");
+ dprintf(f->fd[FCALL_STATE], "active\n");
logmsg(": %s : Audio > Started\n", f->name);
}
@@ -532,7 +532,7 @@ cancelcall(struct friend *f, char *action)
}
ftruncate(f->fd[FCALL_STATE], 0);
lseek(f->fd[FCALL_STATE], 0, SEEK_SET);
- dprintf(f->fd[FCALL_STATE], "0\n");
+ dprintf(f->fd[FCALL_STATE], "none\n");
/* Cancel Tx side of the call */
free(f->av.frame);
@@ -1381,7 +1381,7 @@ friendcreate(int32_t frnum)
/* Dump call pending state */
ftruncate(f->fd[FCALL_STATE], 0);
- dprintf(f->fd[FCALL_STATE], "0\n");
+ dprintf(f->fd[FCALL_STATE], "none\n");
f->av.state = 0;
f->av.num = -1;