Commit 261258c9 authored by Per Cederqvist's avatar Per Cederqvist

(set_client_version): Fail if the client version already was set.

parent 6f562445
/*
* $Id: session.c,v 0.40 1998/10/06 07:23:33 ceder Exp $
* $Id: session.c,v 0.41 1998/10/22 22:07:40 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -29,7 +29,7 @@
*/
static const char *
rcsid = "$Id: session.c,v 0.40 1998/10/06 07:23:33 ceder Exp $";
rcsid = "$Id: session.c,v 0.41 1998/10/22 22:07:40 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -831,6 +831,13 @@ set_client_version (const String client_name,
kom_errno = KOM_LONG_STR;
return FAILURE;
}
if (s_empty(active_connection->client_name) == FALSE
|| s_empty(active_connection->client_version) == FALSE)
{
err_stat = 0;
kom_errno = KOM_CLIENT_IS_CRAZY;
return FAILURE;
}
s_strcpy(&active_connection->client_name, client_name);
s_strcpy(&active_connection->client_version, client_version);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment