Leere Anfrage korrekt mit Fehlermeldung behandeln.
Change-Id: Ie9242448f32327c8d9e20105ad285c7d587a1329
diff --git a/secure/udp/finger.c b/secure/udp/finger.c
index c9d4c4d..b844454 100644
--- a/secure/udp/finger.c
+++ b/secure/udp/finger.c
@@ -16,12 +16,18 @@
void udp_finger(mapping data)
{
+ string response;
+ if (stringp(data[DATA]) && sizeof(data[DATA]))
+ response="/p/daemon/finger"->finger_single(data[DATA]);
+ else
+ response="Du solltest schon sagen, wer Dich interessiert!";
+
last_finger=capitalize(to_string(data[SENDER]))+"@"+data[NAME];
INETD->_send_udp(data[NAME], ([
REQUEST: REPLY,
RECIPIENT: data[SENDER],
ID: data[ID],
- DATA: "/p/daemon/finger"->finger_single(data[DATA])
+ DATA: response
]) );
}