summaryrefslogtreecommitdiff
path: root/src/libgsmd/libgsmd_passthrough.c
diff options
context:
space:
mode:
authorlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2006-10-22 23:17:15 +0000
committerlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2006-10-22 23:17:15 +0000
commit7fe163099476937a14dd7a0714de542f7f94f665 (patch)
tree7e1c703f7f30efd941591d35e51cc57616f60cec /src/libgsmd/libgsmd_passthrough.c
parent1cfa84da8e1defe1a9d138c82afa80374eace8ab (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.c7
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);
personal git repositories of Harald Welte. Your mileage may vary