2.0.1
This commit is contained in:
parent
ee7b7cd779
commit
ea0f4d0651
2 changed files with 7 additions and 1 deletions
4
C/irc.c
4
C/irc.c
|
@ -51,6 +51,7 @@ int IRCC_connect(IRCC_client *irc, const char *ip, const int port) {
|
|||
if (status == -1)
|
||||
return IRCC_ERROR;
|
||||
|
||||
irc->irc_alloc = 1;
|
||||
return IRCC_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -218,6 +219,9 @@ int IRCC_initssl(IRCC_client *irc) {
|
|||
}
|
||||
|
||||
void IRCC_close(IRCC_client *irc) {
|
||||
if (!irc->irc_alloc)
|
||||
return;
|
||||
|
||||
close(irc->irc_socket);
|
||||
irc->irc_msg = irc->irc_nick = irc->irc_channel = NULL;
|
||||
|
||||
|
|
4
C/irc.h
4
C/irc.h
|
@ -12,7 +12,7 @@
|
|||
|
||||
#define IRCC_MSG_MAX 512
|
||||
#define IRCC_PING_TIMEOUT 600
|
||||
#define IRCC_VERSION "2.0"
|
||||
#define IRCC_VERSION "2.0.1"
|
||||
|
||||
#if defined(ENABLE_SSL) || defined(ENABLE_TLS)
|
||||
#include <openssl/ssl.h>
|
||||
|
@ -44,6 +44,8 @@ typedef struct {
|
|||
char *irc_channel;
|
||||
char *irc_nick;
|
||||
|
||||
int irc_alloc;
|
||||
|
||||
#if defined(ENABLE_SSL) || defined(ENABLE_TLS)
|
||||
/* RONLY */
|
||||
int irc_usingssl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue