aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rpcs.cc
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2000-10-09 19:54:42 +0000
committerFritz Elfert <felfert@to.com>2000-10-09 19:54:42 +0000
commit108cbdee49661d0c6e0a8980795c5593dc077d91 (patch)
treeedac72b1142644bfec1bc120a9bd7e0a049bcfa9 /lib/rpcs.cc
parent3f4b0b89d9e45a96dfe660890931aeaa0de87932 (diff)
downloadplptools-108cbdee49661d0c6e0a8980795c5593dc077d91.tar.gz
plptools-108cbdee49661d0c6e0a8980795c5593dc077d91.tar.bz2
plptools-108cbdee49661d0c6e0a8980795c5593dc077d91.zip
Added a hack for Jotter on S5mx and some experimental stuff.
Diffstat (limited to 'lib/rpcs.cc')
-rw-r--r--lib/rpcs.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/rpcs.cc b/lib/rpcs.cc
index f1cac8a..d93fad0 100644
--- a/lib/rpcs.cc
+++ b/lib/rpcs.cc
@@ -153,12 +153,12 @@ getResponse(bufferStore & data, bool statusIsFirstByte)
Enum<rfsv::errs> ret;
if (skt->getBufferStore(data) == 1) {
if (statusIsFirstByte) {
- ret = (enum rfsv::errs)data.getByte(0);
+ ret = (enum rfsv::errs)((char)data.getByte(0));
data.discardFirstBytes(1);
} else {
int l = data.getLen();
if (l > 0) {
- ret = (enum rfsv::errs)data.getByte(data.getLen() - 1);
+ ret = (enum rfsv::errs)((char)data.getByte(data.getLen() - 1));
data.init((const unsigned char *)data.getString(), l - 1);
} else
ret = rfsv::E_PSI_GEN_FAIL;
@@ -198,7 +198,16 @@ execProgram(const char *program, const char *args)
int l = strlen(program);
for (int i = 127; i > l; i--)
a.addByte(0);
- a.addByte(strlen(args));
+
+ /**
+ * This is a hack for the jotter app on mx5 pro. (and probably others)
+ * Jotter seems to read it's arguments one char past normal apps.
+ * Without this hack, The Drive-Character gets lost. Other apps don't
+ * seem to be hurt by the additional blank.
+ */
+ a.addByte(strlen(args) + 1);
+ a.addByte(' ');
+
a.addStringT(args);
if (!sendCommand(EXEC_PROG, a))
return rfsv::E_PSI_FILE_DISC;