1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

libcli: Remove a reference to asn1->ofs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2016-01-04 10:30:35 +01:00 committed by Jeremy Allison
parent b7f0e29fd2
commit 3c340d81d8

View File

@ -220,7 +220,6 @@ nomem:
static bool cldap_socket_recv_dgram(struct cldap_socket *c, static bool cldap_socket_recv_dgram(struct cldap_socket *c,
struct cldap_incoming *in) struct cldap_incoming *in)
{ {
DATA_BLOB blob;
struct asn1_data *asn1; struct asn1_data *asn1;
void *p; void *p;
struct cldap_search_state *search; struct cldap_search_state *search;
@ -230,16 +229,12 @@ static bool cldap_socket_recv_dgram(struct cldap_socket *c,
goto error; goto error;
} }
blob = data_blob_const(in->buf, in->len);
asn1 = asn1_init(in); asn1 = asn1_init(in);
if (!asn1) { if (!asn1) {
goto nomem; goto nomem;
} }
if (!asn1_load(asn1, blob)) { asn1_load_nocopy(asn1, in->buf, in->len);
goto nomem;
}
in->ldap_msg = talloc(in, struct ldap_message); in->ldap_msg = talloc(in, struct ldap_message);
if (in->ldap_msg == NULL) { if (in->ldap_msg == NULL) {
@ -267,8 +262,11 @@ static bool cldap_socket_recv_dgram(struct cldap_socket *c,
search = talloc_get_type_abort(p, struct cldap_search_state); search = talloc_get_type_abort(p, struct cldap_search_state);
search->response.in = talloc_move(search, &in); search->response.in = talloc_move(search, &in);
search->response.asn1 = asn1; search->response.asn1 = asn1;
search->response.asn1->ofs = 0;
asn1_load_nocopy(search->response.asn1,
search->response.in->buf, search->response.in->len);
DLIST_REMOVE(c->searches.list, search); DLIST_REMOVE(c->searches.list, search);