Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b41ad5d authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Remove useless 'svcmgr_handle' (which had wrong type).



Also use the 'ptr' union member rather than 'handle'.

Signed-off-by: default avatarSerban Constantinescu <serban.constantinescu@arm.com>
Change-Id: I68e5336cd3af3bc61dbddd2b33d7e1512c0c329c
parent 1e954441
Loading
Loading
Loading
Loading
+4 −6
Original line number Original line Diff line number Diff line
@@ -3,6 +3,7 @@


#include <errno.h>
#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
@@ -22,8 +23,6 @@
#include <cutils/log.h>
#include <cutils/log.h>
#endif
#endif


uint32_t svcmgr_handle;

const char *str8(const uint16_t *x, size_t x_len)
const char *str8(const uint16_t *x, size_t x_len)
{
{
    static char buf[128];
    static char buf[128];
@@ -254,10 +253,10 @@ int svcmgr_handler(struct binder_state *bs,
    uint32_t strict_policy;
    uint32_t strict_policy;
    int allow_isolated;
    int allow_isolated;


    //ALOGI("target=%x code=%d pid=%d uid=%d\n",
    //ALOGI("target=%p code=%d pid=%d uid=%d\n",
    //  txn->target.handle, txn->code, txn->sender_pid, txn->sender_euid);
    //      (void*) txn->target.ptr, txn->code, txn->sender_pid, txn->sender_euid);


    if (txn->target.handle != svcmgr_handle)
    if (txn->target.ptr != BINDER_SERVICE_MANAGER)
        return -1;
        return -1;


    if (txn->code == PING_TRANSACTION)
    if (txn->code == PING_TRANSACTION)
@@ -381,7 +380,6 @@ int main(int argc, char **argv)
    cb.func_log = selinux_log_callback;
    cb.func_log = selinux_log_callback;
    selinux_set_callback(SELINUX_CB_LOG, cb);
    selinux_set_callback(SELINUX_CB_LOG, cb);


    svcmgr_handle = BINDER_SERVICE_MANAGER;
    binder_loop(bs, svcmgr_handler);
    binder_loop(bs, svcmgr_handler);


    return 0;
    return 0;