@@ -46,7 +46,7 @@ static const int VAL_INTEGER = 1;
46
46
47
47
static const int START_SUCCESS = 0 ;
48
48
49
- int send_intent (struct su_initiator *from, struct su_request *to , const char *socket_path, int allow, int type)
49
+ int send_intent (struct su_context *ctx , const char *socket_path, int allow, int type)
50
50
{
51
51
char sdk_version_prop[PROPERTY_VALUE_MAX] = " 0" ;
52
52
property_get (" ro.build.version.sdk" , sdk_version_prop, " 0" );
@@ -95,25 +95,25 @@ int send_intent(struct su_initiator *from, struct su_request *to, const char *so
95
95
data.writeInt32 (VAL_STRING);
96
96
data.writeString16 (String16 (" caller_uid" ));
97
97
data.writeInt32 (VAL_INTEGER);
98
- data.writeInt32 (from-> uid );
98
+ data.writeInt32 (ctx-> from . uid );
99
99
100
100
data.writeInt32 (VAL_STRING);
101
101
data.writeString16 (String16 (" caller_bin" ));
102
102
data.writeInt32 (VAL_STRING);
103
- data.writeString16 (String16 (from-> bin ));
103
+ data.writeString16 (String16 (ctx-> from . bin ));
104
104
105
105
data.writeInt32 (VAL_STRING);
106
106
data.writeString16 (String16 (" desired_uid" ));
107
107
data.writeInt32 (VAL_INTEGER);
108
- data.writeInt32 (to-> uid );
108
+ data.writeInt32 (ctx-> to . uid );
109
109
110
110
data.writeInt32 (VAL_STRING);
111
111
data.writeString16 (String16 (" desired_cmd" ));
112
112
data.writeInt32 (VAL_STRING);
113
- if (to-> command )
114
- data.writeString16 (String16 (to-> command ));
113
+ if (ctx-> to . command )
114
+ data.writeString16 (String16 (ctx-> to . command ));
115
115
else
116
- data.writeString16 (String16 (to-> shell ));
116
+ data.writeString16 (String16 (ctx-> to . shell ));
117
117
118
118
data.writeInt32 (VAL_STRING);
119
119
data.writeString16 (String16 (" socket" ));
0 commit comments