diff options
author | Simon Busch <morphis@gravedo.de> | 2012-01-27 19:40:22 +0100 |
---|---|---|
committer | Simon Busch <morphis@gravedo.de> | 2012-01-27 19:40:22 +0100 |
commit | b71736ea637ea8611f8585b79a2acf43cf853448 (patch) | |
tree | 2cca02417d79409186601b27f194b27a30d4d62d | |
parent | 59a35f3bd3434c9802dd20f93f2e87854abf387e (diff) | |
download | external_libsamsung-ipc-b71736ea637ea8611f8585b79a2acf43cf853448.zip external_libsamsung-ipc-b71736ea637ea8611f8585b79a2acf43cf853448.tar.gz external_libsamsung-ipc-b71736ea637ea8611f8585b79a2acf43cf853448.tar.bz2 |
gprs: adjust setup method so we can deactivate a gprs context now
Signed-off-by: Simon Busch <morphis@gravedo.de>
-rw-r--r-- | include/gprs.h | 2 | ||||
-rw-r--r-- | samsung-ipc/gprs.c | 21 | ||||
-rw-r--r-- | vapi/samsung-ipc-1.0.vapi | 2 |
3 files changed, 16 insertions, 9 deletions
diff --git a/include/gprs.h b/include/gprs.h index efe4324..8e0408b 100644 --- a/include/gprs.h +++ b/include/gprs.h @@ -90,7 +90,7 @@ struct ipc_gprs_current_session_data_counter { unsigned char unk[9]; }; -void ipc_gprs_pdp_context_setup(struct ipc_gprs_pdp_context *message, char *username, char *password); +void ipc_gprs_pdp_context_setup(struct ipc_gprs_pdp_context *message, int activate, char *username, char *password); #endif diff --git a/samsung-ipc/gprs.c b/samsung-ipc/gprs.c index 6dcce20..0366712 100644 --- a/samsung-ipc/gprs.c +++ b/samsung-ipc/gprs.c @@ -32,15 +32,22 @@ void ipc_gprs_define_pdp_context_setup(struct ipc_gprs_define_pdp_context *messa strncpy((char*)message->apn, apn, 124); } -void ipc_gprs_pdp_context_setup(struct ipc_gprs_pdp_context *message, char *username, char *password) +void ipc_gprs_pdp_context_setup(struct ipc_gprs_pdp_context *message, int activate, char *username, char *password) { assert(message != NULL); - message->unk0[0] = 0x1; - message->unk0[1] = 0x1; - message->unk0[2] = 0x13; - message->unk2 = 0x1; - strncpy((char*)message->username, username, 32); - strncpy((char*)message->password, password, 32); + if (activate) + { + message->unk0[0] = 0x1; + message->unk0[1] = 0x1; + message->unk0[2] = 0x13; + message->unk2 = 0x1; + strncpy((char*)message->username, username, 32); + strncpy((char*)message->password, password, 32); + } + else + { + message->unk0[1] = 0x1; + } } // vim:ts=4:sw=4:expandtab diff --git a/vapi/samsung-ipc-1.0.vapi b/vapi/samsung-ipc-1.0.vapi index b07d052..bc7aa67 100644 --- a/vapi/samsung-ipc-1.0.vapi +++ b/vapi/samsung-ipc-1.0.vapi @@ -962,7 +962,7 @@ namespace SamsungIpc public uint8[] unk1; [CCode (cname = "ipc_gprs_pdp_context_setup")] - public void setup(string username, string password); + public void setup(bool activate, string username, string password); public unowned uint8[] data { |