aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/gprs.h2
-rw-r--r--samsung-ipc/gprs.c21
-rw-r--r--vapi/samsung-ipc-1.0.vapi2
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
{