zhangmeng
2020-08-06 f87b7233a94131a5fd1b3dfb1595226e2779fffa
libcsoftbus.c
@@ -405,6 +405,30 @@
    return fn_dgram_socket_sub_nowait(s, topic, size, port);
}
int wrap_fn_dgram_socket_desub(hcsoftbus lib, void *s, void *topic, int size, int port){
    if (!fn_dgram_socket_desub){
        fn_dgram_socket_desub = (tfn_dgram_socket_desub)dlsym(lib, l_dgram_socket_desub);
        check_with_ret(fn_dgram_socket_desub, lib, -1);
    }
    return fn_dgram_socket_desub(s, topic, size, port);
}
int wrap_fn_dgram_socket_desub_timeout(hcsoftbus lib, void *s, void *topic, int size, int port, int sec, int usec){
    if (!fn_dgram_socket_desub_timeout){
        fn_dgram_socket_desub_timeout = (tfn_dgram_socket_desub_timeout)dlsym(lib, l_dgram_socket_desub_timeout);
        check_with_ret(fn_dgram_socket_desub_timeout, lib, -1);
    }
    return fn_dgram_socket_desub_timeout(s, topic, size, port, sec, usec);
}
int wrap_fn_dgram_socket_desub_nowait(hcsoftbus lib, void *s, void *topic, int size, int port){
    if (!fn_dgram_socket_desub_nowait){
        fn_dgram_socket_desub_nowait = (tfn_dgram_socket_desub_nowait)dlsym(lib, l_dgram_socket_desub_nowait);
        check_with_ret(fn_dgram_socket_desub_nowait, lib, -1);
    }
    return fn_dgram_socket_desub_nowait(s, topic, size, port);
}
int wrap_fn_dgram_socket_pub(hcsoftbus lib, void *s, void *topic, int tsize, void *content, int csize, int port){
    if (!fn_dgram_socket_pub){
        fn_dgram_socket_pub = (tfn_dgram_socket_pub)dlsym(lib, l_dgram_socket_pub);
@@ -448,3 +472,18 @@
    }
}
int wrap_fn_dgram_remove_key(hcsoftbus lib, int key){
    if (!fn_dgram_remove_key){
        fn_dgram_remove_key = (tfn_dgram_remove_key)dlsym(lib, l_dgram_remove_key);
        check_with_ret(fn_dgram_remove_key, lib, -1);
    }
    return fn_dgram_remove_key(key);
}
int wrap_fn_dgram_remove_keys(hcsoftbus lib, void *keys, int length){
    if (!fn_dgram_remove_keys){
        fn_dgram_remove_keys = (tfn_dgram_remove_keys)dlsym(lib, l_dgram_remove_keys);
        check_with_ret(fn_dgram_remove_keys, lib, -1);
    }
    return fn_dgram_remove_keys((int*)keys, length);
}