diff options
author | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2006-10-22 23:17:15 +0000 |
---|---|---|
committer | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2006-10-22 23:17:15 +0000 |
commit | 7fe163099476937a14dd7a0714de542f7f94f665 (patch) | |
tree | 7e1c703f7f30efd941591d35e51cc57616f60cec /src/libgsmd/libgsmd_passthrough.c | |
parent | 1cfa84da8e1defe1a9d138c82afa80374eace8ab (diff) |
gsmd passthrough mode now working
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@109 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src/libgsmd/libgsmd_passthrough.c')
-rw-r--r-- | src/libgsmd/libgsmd_passthrough.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libgsmd/libgsmd_passthrough.c b/src/libgsmd/libgsmd_passthrough.c index 45ce066..66f4a82 100644 --- a/src/libgsmd/libgsmd_passthrough.c +++ b/src/libgsmd/libgsmd_passthrough.c @@ -5,6 +5,7 @@ #include <errno.h> #include <sys/types.h> +#include <sys/socket.h> #include <gsmd/usock.h> #include <libgsmd/libgsmd.h> @@ -16,7 +17,7 @@ static u_int16_t next_msg_id; static int lgsm_send(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh) { gmh->id = next_msg_id++; - return send(lh->fd, (char *) gmh, sizeof(*gmh) + gmh->len); + return send(lh->fd, (char *) gmh, sizeof(*gmh) + gmh->len, 0); } #define PT_BUF_SIZE 1024 @@ -37,8 +38,8 @@ int lgsm_passthrough(struct lgsm_handle *lh, const char *tx, char *rx, unsigned gmh->version = GSMD_PROTO_VERSION; gmh->msg_type = GSMD_MSG_PASSTHROUGH; - gmh->msg_subtype = GSMD_PASSTHROUGH_REQUEST; - gmh->len = len; + gmh->msg_subtype = GSMD_PASSTHROUGH_REQ; + gmh->len = len+1; strcpy(tx_buf, tx); rc = lgsm_send(lh, gmh); |