aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--call.c2
-rw-r--r--include/call.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/call.c b/call.c
index 66bc8dc..8d86f61 100644
--- a/call.c
+++ b/call.c
@@ -37,7 +37,7 @@ void msm_call_outgoing(const char *number, int identity, int request_id)
call.prefix = MSM_CALL_PREFIX_NONE;
call.length = strlen(number);
- memcpy(call.number, number, call.length);
+ memcpy(call.number, number, strlen(number));
msm_send(MSM_CALL_OUTGOING, MSM_TYPE_EXEC, (unsigned char*)&call, sizeof(call), request_id);
}
diff --git a/include/call.h b/include/call.h
index 7438d1d..3f04068 100644
--- a/include/call.h
+++ b/include/call.h
@@ -44,12 +44,16 @@
#define MSM_CALL_PREFIX_NONE 0x00
#define MSM_CALL_PREFIX_INTL 0x11
+/* Only for msm_call_status, NOT call_list */
#define MSM_CALL_STATE_DIALING 0x01
#define MSM_CALL_STATE_IGNORING_INCOMING_STATUS 0x02
#define MSM_CALL_STATE_CONNECTED 0x03
#define MSM_CALL_STATE_RELEASED 0x04
#define MSM_CALL_STATE_CONNECTING 0x05
+#define MSM_CALL_TERM_MO 0x01
+#define MSM_CALL_TERM_MT 0x02
+
struct msm_call_outgoing {
unsigned char type, identity;
unsigned char length, prefix;
@@ -62,7 +66,7 @@ struct msm_call_incoming {
struct msm_call_list_entry {
unsigned char type, idx;
- unsigned char term, state, unk3;
+ unsigned char term, state, mpty;
unsigned char number_len;
unsigned char unk4;
} __attribute__((__packed__));