summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2017-08-09 18:12:54 +0200
committerSimon Rettberg2017-08-09 18:12:54 +0200
commit72d54e049010f0f07272be131d724ebc6134fbc8 (patch)
tree193762e50307678b8e6ed35a354e271da0ca071f
parentFix PRESENT filter handling (diff)
downloadldadp-72d54e049010f0f07272be131d724ebc6134fbc8.tar.gz
ldadp-72d54e049010f0f07272be131d724ebc6134fbc8.tar.xz
ldadp-72d54e049010f0f07272be131d724ebc6134fbc8.zip
Debug output
-rw-r--r--Makefile8
-rw-r--r--server.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 2f005ee..4af6135 100644
--- a/Makefile
+++ b/Makefile
@@ -41,13 +41,13 @@ LIBS+=-g -lowfat -lssl -lcrypto
%: %.c
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) ${LIBS}
-ldadp: tmpbuffer.o ini.o client.o server.o helper.o proxy.o epoll.o openssl.o \
-ldap.a asn1.a \
-types.h epoll.h client.h server.h helper.h
+ldadp: tmpbuffer.o ini.o client.o server.o helper.o proxy.o epoll.o openssl.o ldap.a asn1.a
+
+qndtest: ldap.a asn1.a
.PHONY: clean tar
clean:
- rm -f *.[ao] ldadp
+ rm -f *.[ao] ldadp qndtest
tar: clean
cd ..; tar cvvf ldadp.tar.bz2 ldadp --use=bzip2 --exclude capture --exclude .git
diff --git a/server.c b/server.c
index d5fba2a..1f5fba3 100644
--- a/server.c
+++ b/server.c
@@ -287,6 +287,14 @@ uint32_t server_searchRequestOnConnection(epoll_server_t *server, struct SearchR
char buffer[bodyLen + 50];
char *bufoff = buffer + 50;
fmt_ldapsearchrequest(bufoff, req);
+ if (_debugLevel >= DEBUG_TRACE) {
+ struct SearchRequest tmp;
+ if (0 != scan_ldapsearchrequest(bufoff, bufoff + bodyLen, &tmp)) {
+ printf("[Client] Search request: (deserialized): ");
+ helper_printfilter(tmp.filter);
+ free_ldapsearchrequest(&tmp);
+ }
+ }
fmt_ldapmessage(bufoff - headerLen, msgid, SearchRequest, bodyLen);
if (!server_send(server, bufoff - headerLen, headerLen + bodyLen, FALSE)) return 0;
return msgid;