about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/connection.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index 4120fd99..cf721a85 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -173,10 +173,14 @@ jabber_disconnect(void)
         _connection_free_saved_account();
         _connection_free_saved_details();
         _connection_free_session_data();
-        xmpp_conn_release(jabber_conn.conn);
-        jabber_conn.conn = NULL;
-        xmpp_ctx_free(jabber_conn.ctx);
-        jabber_conn.ctx = NULL;
+        if (jabber_conn.conn != NULL) {
+            xmpp_conn_release(jabber_conn.conn);
+            jabber_conn.conn = NULL;
+        }
+        if (jabber_conn.ctx != NULL) {
+            xmpp_ctx_free(jabber_conn.ctx);
+            jabber_conn.ctx = NULL;
+        }
     }
 
     jabber_conn.conn_status = JABBER_STARTED;
@@ -388,7 +392,15 @@ _jabber_connect(const char * const fulljid, const char * const passwd,
         xmpp_ctx_free(jabber_conn.ctx);
     }
     jabber_conn.ctx = xmpp_ctx_new(NULL, jabber_conn.log);
+    if (jabber_conn.ctx == NULL) {
+        log_warning("Failed to get libstrophe ctx during connect");
+        return JABBER_DISCONNECTED;
+    }
     jabber_conn.conn = xmpp_conn_new(jabber_conn.ctx);
+    if (jabber_conn.conn == NULL) {
+        log_warning("Failed to get libstrophe conn during connect");
+        return JABBER_DISCONNECTED;
+    }
     xmpp_conn_set_jid(jabber_conn.conn, fulljid);
     xmpp_conn_set_pass(jabber_conn.conn, passwd);
     if (jabber_conn.tls_disabled) {




                                                                                                                                                                                                                                                                            




              


                                                                                                                                                                                                                                                                                                                                                                                   






























                                                                                                                                      
%%%
title = "Pragmatic Use of Nonfree Software"
abbrev = "Pragmatic Use of Nonfree Software"
area = "Free Software"
workgroup = "Free Software Community"
submissiontype = "independent"
ipr = "none"
keyword = ["Nonfree", "Pragmatics"]
#updates = [ 2555, 5540 ]
#date = 2003-04-01T00:00:00Z

[seriesInfo]
name = "Internet-Draft"
value = "pragmatic-use-of-nonfree-software"
stream = "independent"
status = "informational"

[[author]]
initials = "A. Yu"
surname = "Yu"
fullname = "Andrew Yu"
#role = "author"
organization = "The Second School Affiliated to Fudan University"
  [author.address]
  email = "andrew@andrewyu.org"
  uri = "https://www.andrewyu.org/"
%%%

.# Abstract

Free Software is undoubtably a good thing for society.  However, modern computer users are stuck in the proprietary "ecosystem" for historical reasons.  This document describes the author's viewpoint of using proprietary platforms to spread the ideas of Free Software.

.# Status of This Memo

This document describes the author's viewpoint.  This does not represent the ideas of the Free Software Foundation or any other entity.  Distribution of this memo is unlimited.

{mainmatter}

# Introduction

Readers of this memo probably understand the ideals of the Free Software Movement, and avoid proprietary software when possible.  However, as most outsiders are unaware and are deeply buried inside the proprietary dystopia created by mostly multibillion-dollar technology coorporations, our methods of communicating with the masses are ineffective.

In February 2022, the author decided to adjust his dogma, and permitted limited usage of nonfree chat platforms to hopefully spread our ideas to the general public.  This was attempted by registering a Discord account, creating a Guild called "Free Software Introductions", and setting up a basic Discord-to-IRC relay to #fsi on both irc.andrewyu.org and irc.libera.chat.

# Conclusion

Hi

# FSF Considerations

Hi

{backmatter}

{numbered="false"}
# Acknowledgements

Many thanks to iShareFreedom, qrpnxz, DiffieHellman, Leah Rowe and many others for the ideas (and rebutted arguments) in this article.

{numbered="false"}
# Contributors

Many thanks to everyone in the Free Software community for the freedom we have today.

<reference anchor="IETF1" target="https://www.ietf.org/old/2009/proceedings/prior29/IETF01.pdf">
   <front>
      <title>Proceedings of the 16-17 January 1986 DARPA Gateway Algorithms and Data Structures Task Force</title>
      <author>
         <organization>The MITRE Corporation</organization>
      </author>
      <date year="1986" month="January"></date>
   </front>
</reference>