zhangmeng
2020-08-03 0bde715af72b7b3d55ad3aac816d7cd153a60b42
libcsoftbus.c
@@ -308,6 +308,22 @@
    return fn_dgram_socket_sendto(s, buf, size, port);
}
int wrap_fn_dgram_socket_sendto_timeout(hcsoftbus lib, void *s, const void *buf, const int size, const int port, int sec, int usec){
    if (!fn_dgram_socket_sendto_timeout){
        fn_dgram_socket_sendto_timeout = (tfn_dgram_socket_sendto_timeout)dlsym(lib, l_dgram_socket_sendto_timeout);
        check_with_ret(fn_dgram_socket_sendto_timeout, lib, -1);
    }
    return fn_dgram_socket_sendto_timeout(s, buf, size, port, sec, usec);
}
int wrap_fn_dgram_socket_sendto_nowait(hcsoftbus lib, void *s, const void *buf, const int size, const int port){
    if (!fn_dgram_socket_sendto_nowait){
        fn_dgram_socket_sendto_nowait = (tfn_dgram_socket_sendto_nowait)dlsym(lib, l_dgram_socket_sendto_nowait);
        check_with_ret(fn_dgram_socket_sendto_nowait, lib, -1);
    }
    return fn_dgram_socket_sendto_nowait(s, buf, size, port);
}
int wrap_fn_dgram_socket_recvfrom(hcsoftbus lib, void *s, void **buf, int *size, int *port){
    if (!fn_dgram_socket_recvfrom){
        fn_dgram_socket_recvfrom = (tfn_dgram_socket_recvfrom)dlsym(lib, l_dgram_socket_recvfrom);
@@ -316,12 +332,45 @@
    return fn_dgram_socket_recvfrom(s, buf, size, port);
}
int wrap_fn_dgram_socket_recvfrom_timeout(hcsoftbus lib, void *s, void **buf, int *size, int *port, int sec, int usec){
    if (!fn_dgram_socket_recvfrom_timeout){
        fn_dgram_socket_recvfrom_timeout = (tfn_dgram_socket_recvfrom_timeout)dlsym(lib, l_dgram_socket_recvfrom_timeout);
        check_with_ret(fn_dgram_socket_recvfrom_timeout, lib, -1);
    }
    return fn_dgram_socket_recvfrom_timeout(s, buf, size, port, sec, usec);
}
int wrap_fn_dgram_socket_recvfrom_nowait(hcsoftbus lib, void *s, void **buf, int *size, int *port){
    if (!fn_dgram_socket_recvfrom_nowait){
        fn_dgram_socket_recvfrom_nowait = (tfn_dgram_socket_recvfrom_nowait)dlsym(lib, l_dgram_socket_recvfrom_nowait);
        check_with_ret(fn_dgram_socket_recvfrom_nowait, lib, -1);
    }
    return fn_dgram_socket_recvfrom_nowait(s, buf, size, port);
}
int wrap_fn_dgram_socket_sendandrecv(hcsoftbus lib, void *s, const void *sbuf, const int ssize, const int port, void **rbuf, int *rsize){
    if (!fn_dgram_socket_sendandrecv){
        fn_dgram_socket_sendandrecv = (tfn_dgram_socket_sendandrecv)dlsym(lib, l_dgram_socket_sendandrecv);
        check_with_ret(fn_dgram_socket_sendandrecv, lib, -1);
    }
    return fn_dgram_socket_sendandrecv(s, sbuf, ssize, port, rbuf, rsize);
}
int wrap_fn_dgram_socket_sendandrecv_timeout(hcsoftbus lib, void *s, const void *sbuf, const int ssize, const int port, void **rbuf, int *rsize, int sec, int usec){
    if (!fn_dgram_socket_sendandrecv_timeout){
        fn_dgram_socket_sendandrecv_timeout = (tfn_dgram_socket_sendandrecv_timeout)dlsym(lib, l_dgram_socket_sendandrecv_timeout);
        check_with_ret(fn_dgram_socket_sendandrecv_timeout, lib, -1);
    }
    return fn_dgram_socket_sendandrecv_timeout(s, sbuf, ssize, port, rbuf, rsize, sec, usec);
}
int wrap_fn_dgram_socket_sendandrecv_nowait(hcsoftbus lib, void *s, const void *sbuf, const int ssize, const int port, void **rbuf, int *rsize){
    if (!fn_dgram_socket_sendandrecv_nowait){
        fn_dgram_socket_sendandrecv_nowait = (tfn_dgram_socket_sendandrecv_nowait)dlsym(lib, l_dgram_socket_sendandrecv_nowait);
        check_with_ret(fn_dgram_socket_sendandrecv_nowait, lib, -1);
    }
    return fn_dgram_socket_sendandrecv_nowait(s, sbuf, ssize, port, rbuf, rsize);
}
int wrap_fn_dgram_socket_start_bus(hcsoftbus lib, void *s){
@@ -340,6 +389,22 @@
    return fn_dgram_socket_sub(s, topic, size, port);
}
int wrap_fn_dgram_socket_sub_timeout(hcsoftbus lib, void *s, void *topic, int size, int port, int sec, int usec){
    if (!fn_dgram_socket_sub_timeout){
        fn_dgram_socket_sub_timeout = (tfn_dgram_socket_sub_timeout)dlsym(lib, l_dgram_socket_sub_timeout);
        check_with_ret(fn_dgram_socket_sub_timeout, lib, -1);
    }
    return fn_dgram_socket_sub_timeout(s, topic, size, port, sec, usec);
}
int wrap_fn_dgram_socket_sub_nowait(hcsoftbus lib, void *s, void *topic, int size, int port){
    if (!fn_dgram_socket_sub_nowait){
        fn_dgram_socket_sub_nowait = (tfn_dgram_socket_sub_nowait)dlsym(lib, l_dgram_socket_sub_nowait);
        check_with_ret(fn_dgram_socket_sub_nowait, lib, -1);
    }
    return fn_dgram_socket_sub_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);
@@ -348,6 +413,22 @@
    return fn_dgram_socket_pub(s, topic, tsize, content, csize, port);
}
int wrap_fn_dgram_socket_pub_timeout(hcsoftbus lib, void *s, void *topic, int tsize, void *content, int csize, int port, int sec, int usec){
    if (!fn_dgram_socket_pub_timeout){
        fn_dgram_socket_pub_timeout = (tfn_dgram_socket_pub_timeout)dlsym(lib, l_dgram_socket_pub_timeout);
        check_with_ret(fn_dgram_socket_pub_timeout, lib, -1);
    }
    return fn_dgram_socket_pub_timeout(s, topic, tsize, content, csize, port, sec, usec);
}
int wrap_fn_dgram_socket_pub_nowait(hcsoftbus lib, void *s, void *topic, int tsize, void *content, int csize, int port){
    if (!fn_dgram_socket_pub_nowait){
        fn_dgram_socket_pub_nowait = (tfn_dgram_socket_pub_nowait)dlsym(lib, l_dgram_socket_pub_nowait);
        check_with_ret(fn_dgram_socket_pub_nowait, lib, -1);
    }
    return fn_dgram_socket_pub_nowait(s, topic, tsize, content, csize, port);
}
int wrap_fn_dgram_socket_port(hcsoftbus lib, void *s){
    if (!fn_dgram_socket_port){
        fn_dgram_socket_port = (tfn_dgram_socket_port)dlsym(lib, l_dgram_socket_port);