Revert "Add formal argument 'secret' to two public functions."
[libradsec.git] / lib / packet.c
index fe87bfd..ba7ddb8 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright 2010, 2011 NORDUnet A/S. All rights reserved.
-   See the file COPYING for licensing information.  */
+   See LICENSE for licensing information.  */
 
 #if defined HAVE_CONFIG_H
 #include <config.h>
@@ -137,16 +137,6 @@ rs_packet_create (struct rs_connection *conn, struct rs_packet **pkt_out)
   if (rpkt == NULL)
     return rs_err_conn_push (conn, RSE_NOMEM, __func__);
 
-  /*
-   * This doesn't make sense; the packet identifier is constant for
-   * an entire conversation. A separate API should be provided to
-   * allow the application to set the packet ID, or a conversation
-   * object should group related packets together.
-   */
-#if 0
-  rpkt->id = conn->nextid++
-#endif
-
   err = nr_packet_init (rpkt, NULL, NULL,
                        PW_ACCESS_REQUEST,
                        rpkt + 1, RS_MAX_PACKET_LEN);
@@ -169,9 +159,7 @@ rs_packet_create (struct rs_connection *conn, struct rs_packet **pkt_out)
 int
 rs_packet_create_authn_request (struct rs_connection *conn,
                                struct rs_packet **pkt_out,
-                               const char *user_name,
-                                const char *user_pw,
-                                const char *secret)
+                               const char *user_name, const char *user_pw)
 {
   struct rs_packet *pkt;
   int err;
@@ -191,7 +179,6 @@ rs_packet_create_authn_request (struct rs_connection *conn,
 
   if (user_pw)
     {
-      pkt->rpkt->secret = secret;
       err = rs_packet_append_avp (pkt, PW_USER_PASSWORD, 0, user_pw, 0);
       if (err)
        return err;
@@ -213,7 +200,7 @@ rs_packet_destroy (struct rs_packet *pkt)
 }
 
 int
-rs_packet_append_avp (struct rs_packet *pkt, 
+rs_packet_append_avp (struct rs_packet *pkt,
                       unsigned int attr, unsigned int vendor,
                       const void *data, size_t data_len)
 {