Merge upstream
[jelmer/ctrlproxy.git] / src / client.c
index 48d32db8edfffc2fba22f2d8424eb8ba6bf1e66f..0d8f3e4be1aed4244b596bea891ca4b26c4fa6a8 100644 (file)
@@ -4,7 +4,7 @@
 
        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
+       the Free Software Foundation; either version 3 of the License, or
        (at your option) any later version.
 
        This program is distributed in the hope that it will be useful,
@@ -202,8 +202,11 @@ gboolean client_send_args(struct client *c, ...)
  */
 gboolean client_send_line(struct client *c, const struct line *l)
 {
-       g_assert(c);
-       g_assert(l);
+       if (c->connected == FALSE)
+               return FALSE;
+
+       g_assert(c != NULL);
+       g_assert(l != NULL);
        log_client_line(c, l, FALSE);
 
        state_handle_data(c->state, l);