diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-07-20 09:06:04 +0200 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-07-20 09:06:04 +0200 |
commit | c9326e5fd46bb1ba986f0bcecebea6c044616656 (patch) | |
tree | 94f0d179fd7104287fdf34a297b38aae0b19bfd5 | |
parent | 63058d5bdb8a50fe650a7b91f6c6e29bdaf583b9 (diff) | |
download | i9305_modem-c9326e5fd46bb1ba986f0bcecebea6c044616656.zip i9305_modem-c9326e5fd46bb1ba986f0bcecebea6c044616656.tar.gz i9305_modem-c9326e5fd46bb1ba986f0bcecebea6c044616656.tar.bz2 |
sahara: check if hello data was received and don't print alt file name
The other memory table entry, that should provide a file name, was
always empty during testing.
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r-- | sahara.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -63,7 +63,11 @@ int hello_response(int tty_fd, int mode) struct sah_hello_resp hello_resp; int rc; - read_hello_data(tty_fd, mode, &hello_req); + rc = read_hello_data(tty_fd, mode, &hello_req); + if (rc < 0) { + printf("error receiving hello data\n"); + return -1; + } hello_resp.header.command = SAH_COMMAND_HELLO_RESP; hello_resp.header.packet_size = sizeof(hello_resp); @@ -350,9 +354,9 @@ int efs_sync(int tty_fd) return -1; } - printf("requested file %s (alt file name '%s') with address %d and size %d\n", - memory_table.file, memory_table.empty, - memory_table.address, memory_table.size); + printf("requested file %s with address %d and size %d\n", + memory_table.file, memory_table.address, + memory_table.size); rc = check_efs_file_request(memory_table.file); if (rc < 0) { |