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 /samsung-ipc/gprs.c | |
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>
Diffstat (limited to 'samsung-ipc/gprs.c')
-rw-r--r-- | samsung-ipc/gprs.c | 21 |
1 files changed, 14 insertions, 7 deletions
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 |