Fixed the heartbeat sending. Move silc_client_packet_send
authorPekka Riikonen <priikone@silcnet.org>
Sun, 27 Oct 2002 10:24:14 +0000 (10:24 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 27 Oct 2002 10:24:14 +0000 (10:24 +0000)
to be public function.

apps/irssi/src/silc/core/silc-servers.c
lib/silcclient/client.c
lib/silcclient/client_internal.h
lib/silcclient/silcclient.h

index 78298e5331499dcb0db19a38215f7a1027a39593..c72705885798aecbb23ae7ee873220e5619c7737 100644 (file)
@@ -266,9 +266,8 @@ void silc_send_heartbeat(SilcSocketConnection sock,
   if (server == NULL)
     return;
 
-  silc_client_packet_send(silc_client, sock, SILC_PACKET_HEARTBEAT, 0,
-                         NULL, 0, FALSE);
-
+  silc_client_packet_send(silc_client, sock, SILC_PACKET_HEARTBEAT,
+                         NULL, 0, NULL, NULL, NULL, 0, FALSE);
 }
 
 static void sig_connected(SILC_SERVER_REC *server)
index d8f7dbdea3f6e7633bc04e99fda198fd0db8ebdf..06a1ffbb99d3e68a3b8b0835dbcda026514bd8e9 100644 (file)
@@ -1282,7 +1282,7 @@ void silc_client_packet_send(SilcClient client,
                             SilcHmac hmac,
                             unsigned char *data, 
                             SilcUInt32 data_len, 
-                            int force_send)
+                            bool force_send)
 {
   SilcPacketContext packetdata;
   const SilcBufferStruct packet;
index 40714fb8bc99ba884723f1a3fa405e9e479d403a..8d4c4f2184aa10eb2b5883c251b9d96b28e94b40 100644 (file)
@@ -149,16 +149,6 @@ void silc_client_ftp_free_sessions(SilcClient client,
 void silc_client_ftp_session_free(SilcClientFtpSession session);
 void silc_client_ftp_session_free_client(SilcClientConnection conn,
                                         SilcClientEntry client_entry);
-void silc_client_packet_send(SilcClient client, 
-                            SilcSocketConnection sock,
-                            SilcPacketType type, 
-                            void *dst_id,
-                            SilcIdType dst_id_type,
-                            SilcCipher cipher,
-                            SilcHmac hmac,
-                            unsigned char *data, 
-                            SilcUInt32 data_len, 
-                            int force_send);
 void silc_client_close_connection_real(SilcClient client,
                                       SilcSocketConnection sock,
                                       SilcClientConnection conn);
index bf46038cd1cd1862ecf4bcedcc784a1ad3c77867..2d578ef1ed758f04e131c3df89d85b34f9677e23 100644 (file)
@@ -2281,6 +2281,45 @@ const SilcHashTable silc_client_attributes_get(SilcClient client,
  ***/
 SilcBuffer silc_client_attributes_request(SilcAttribute attribute, ...);
 
+/* Low level packet sending functions */
+
+/****f* silcclient/SilcClientAPI/silc_client_packet_send
+ *
+ * SYNOPSIS
+ *
+ *    void silc_client_packet_send(SilcClient client, 
+ *                                 SilcSocketConnection sock,
+ *                                 SilcPacketType type, 
+ *                                 void *dst_id,
+ *                                 SilcIdType dst_id_type,
+ *                                 SilcCipher cipher,
+ *                                 SilcHmac hmac,
+ *                                 unsigned char *data, 
+ *                                 SilcUInt32 data_len, 
+ *                                 bool force_send);
+ *
+ * DESCRIPTION
+ *
+ *    Constructs a Requested Attributes buffer. If the `attribute' is zero (0)
+ *    then all attributes are requested.  Alternatively, `attribute' and
+ *    all variable arguments can each be requested attribute.  In this case
+ *    the last must be set to zero (0) to complete the variable list of
+ *    requested attributes.  See SilcAttribute for all attributes.
+ *    You can give the returned buffer as argument to for example
+ *    silc_client_get_client_by_id_resolve function.
+ *
+ ***/
+void silc_client_packet_send(SilcClient client, 
+                            SilcSocketConnection sock,
+                            SilcPacketType type, 
+                            void *dst_id,
+                            SilcIdType dst_id_type,
+                            SilcCipher cipher,
+                            SilcHmac hmac,
+                            unsigned char *data, 
+                            SilcUInt32 data_len, 
+                            bool force_send);
+
 #include "client.h"
 #include "command.h"
 #include "command_reply.h"