Added GPL license header to all source files
[dockapps/wmnotify.git] / src / network.c
index b46bce7..e264205 100644 (file)
@@ -1,5 +1,22 @@
-/* network.c -- common routines for POP3 and IMAP protocols */
-
+/*
+ * network.c -- common routines for POP3 and IMAP protocols
+ *
+ * Copyright (C) 2003 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 /* Define filename_M */
 #define NETWORK_M 1
@@ -106,7 +123,7 @@ ConnectionEstablish( char *server_name, int port )
   }
 
 #if HAVE_SSL
-  if( wmnotify_infos.use_ssl == TRUE ) {
+  if( wmnotify_infos.use_ssl == true ) {
     int status;
     status = InitSSL( wmnotify_infos.sock_fd );
     if( status != EXIT_SUCCESS ) {
@@ -137,7 +154,7 @@ int
 ConnectionTerminate( void )
 {
 #if HAVE_SSL
-  if( wmnotify_infos.use_ssl == TRUE ) {
+  if( wmnotify_infos.use_ssl == true ) {
     SSL_free( ssl_infos.ssl ); /* release connection state */
   }
 #endif
@@ -145,7 +162,7 @@ ConnectionTerminate( void )
   close( wmnotify_infos.sock_fd ); /* close socket */
 
 #if HAVE_SSL
-  if( wmnotify_infos.use_ssl == TRUE ) {
+  if( wmnotify_infos.use_ssl == true ) {
     SSL_CTX_free( ssl_infos.ctx ); /* release context */
   }
 #endif
@@ -160,7 +177,7 @@ WmnotifySendData( char *buffer, int size )
   int len;
 
 #if HAVE_SSL
-  if( wmnotify_infos.use_ssl == TRUE ) {
+  if( wmnotify_infos.use_ssl == true ) {
     len = SSL_write( ssl_infos.ssl, buffer, size ); /* Encrypt & send message */
     if( len <= 0 ) {
       SSL_get_error( ssl_infos.ssl, len );
@@ -193,7 +210,7 @@ WmnotifyGetResponse( char *buffer, int max_size )
   int len;
 
 #if HAVE_SSL
-  if( wmnotify_infos.use_ssl == TRUE ) {
+  if( wmnotify_infos.use_ssl == true ) {
     len = SSL_read( ssl_infos.ssl, buffer, max_size ); /* Get reply & decrypt. */
     switch( SSL_get_error( ssl_infos.ssl, len ) ) {
     case SSL_ERROR_NONE: