Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/libcli/cldap/cldap.c

    r414 r740  
    168168}
    169169
    170 static void cldap_socket_recv_dgram(struct cldap_socket *c,
     170static bool cldap_socket_recv_dgram(struct cldap_socket *c,
    171171                                    struct cldap_incoming *in);
    172172
     
    177177        struct cldap_incoming *in = NULL;
    178178        ssize_t ret;
     179        bool setup_done;
    179180
    180181        c->recv_subreq = NULL;
     
    200201
    201202        /* this function should free or steal 'in' */
    202         cldap_socket_recv_dgram(c, in);
     203        setup_done = cldap_socket_recv_dgram(c, in);
    203204        in = NULL;
    204205
    205         if (!cldap_recvfrom_setup(c)) {
     206        if (!setup_done && !cldap_recvfrom_setup(c)) {
    206207                goto nomem;
    207208        }
     
    219220  handle recv events on a cldap socket
    220221*/
    221 static void cldap_socket_recv_dgram(struct cldap_socket *c,
     222static bool cldap_socket_recv_dgram(struct cldap_socket *c,
    222223                                    struct cldap_incoming *in)
    223224{
     
    263264                /* this function should free or steal 'in' */
    264265                c->incoming.handler(c, c->incoming.private_data, in);
    265                 return;
     266                return false;
    266267        }
    267268
     
    271272        search->response.asn1->ofs = 0;
    272273
     274        DLIST_REMOVE(c->searches.list, search);
     275
     276        if (!cldap_recvfrom_setup(c)) {
     277                goto nomem;
     278        }
     279
    273280        tevent_req_done(search->req);
    274         goto done;
     281        talloc_free(in);
     282        return true;
    275283
    276284nomem:
     
    290298done:
    291299        talloc_free(in);
     300        return false;
    292301}
    293302
     
    321330
    322331        if (!local_addr) {
    323                 ret = tsocket_address_inet_from_strings(c, "ip",
     332                /* we use ipv4 here instead of ip, as otherwise we end
     333                   up with a PF_INET6 socket, and sendto() for ipv4
     334                   addresses will fail. That breaks cldap name
     335                   resolution for winbind to IPv4 hosts. */
     336                ret = tsocket_address_inet_from_strings(c, "ipv4",
    324337                                                        NULL, 0,
    325338                                                        &any);
     
    947960*/
    948961NTSTATUS cldap_netlogon_recv(struct tevent_req *req,
    949                              struct smb_iconv_convenience *iconv_convenience,
    950962                             TALLOC_CTX *mem_ctx,
    951963                             struct cldap_netlogon *io)
     
    975987
    976988        status = pull_netlogon_samlogon_response(data, mem_ctx,
    977                                                  iconv_convenience,
    978989                                                 &io->out.netlogon);
    979990        if (!NT_STATUS_IS_OK(status)) {
     
    9951006*/
    9961007NTSTATUS cldap_netlogon(struct cldap_socket *cldap,
    997                         struct smb_iconv_convenience *iconv_convenience,
    9981008                        TALLOC_CTX *mem_ctx,
    9991009                        struct cldap_netlogon *io)
     
    10181028        }
    10191029
    1020         status = cldap_netlogon_recv(req, iconv_convenience, mem_ctx, io);
     1030        status = cldap_netlogon_recv(req, mem_ctx, io);
    10211031        talloc_free(req);
    10221032
     
    10821092*/
    10831093NTSTATUS cldap_netlogon_reply(struct cldap_socket *cldap,
    1084                               struct smb_iconv_convenience *iconv_convenience,
    10851094                              uint32_t message_id,
    10861095                              struct tsocket_address *dest,
     
    10961105
    10971106        status = push_netlogon_samlogon_response(&blob, tmp_ctx,
    1098                                                  iconv_convenience,
    10991107                                                 netlogon);
    11001108        if (!NT_STATUS_IS_OK(status)) {
Note: See TracChangeset for help on using the changeset viewer.