Rename connection_abort() to connection_kill()
This commit is contained in:
		
							
								
								
									
										16
									
								
								src/kike.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								src/kike.c
									
									
									
									
									
								
							@@ -350,7 +350,7 @@ error_ssl_1:
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
connection_abort (struct connection *conn, const char *reason)
 | 
			
		||||
connection_kill (struct connection *conn, const char *reason)
 | 
			
		||||
{
 | 
			
		||||
	// TODO: send a QUIT message with `reason' || "Client exited"
 | 
			
		||||
	(void) reason;
 | 
			
		||||
@@ -398,7 +398,7 @@ irc_try_read (struct connection *conn)
 | 
			
		||||
		}
 | 
			
		||||
		if (n_read == 0)
 | 
			
		||||
		{
 | 
			
		||||
			connection_abort (conn, NULL);
 | 
			
		||||
			connection_kill (conn, NULL);
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@@ -408,7 +408,7 @@ irc_try_read (struct connection *conn)
 | 
			
		||||
			continue;
 | 
			
		||||
 | 
			
		||||
		print_debug ("%s: %s: %s", __func__, "recv", strerror (errno));
 | 
			
		||||
		connection_abort (conn, strerror (errno));
 | 
			
		||||
		connection_kill (conn, strerror (errno));
 | 
			
		||||
		return false;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -436,7 +436,7 @@ irc_try_read_ssl (struct connection *conn)
 | 
			
		||||
			irc_process_buffer (buf, irc_process_message, conn);
 | 
			
		||||
			continue;
 | 
			
		||||
		case SSL_ERROR_ZERO_RETURN:
 | 
			
		||||
			connection_abort (conn, NULL);
 | 
			
		||||
			connection_kill (conn, NULL);
 | 
			
		||||
			return false;
 | 
			
		||||
		case SSL_ERROR_WANT_READ:
 | 
			
		||||
			return true;
 | 
			
		||||
@@ -447,7 +447,7 @@ irc_try_read_ssl (struct connection *conn)
 | 
			
		||||
			continue;
 | 
			
		||||
		default:
 | 
			
		||||
			print_debug ("%s: %s: %s", __func__, "SSL_read", error_info);
 | 
			
		||||
			connection_abort (conn, error_info);
 | 
			
		||||
			connection_kill (conn, error_info);
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
@@ -479,7 +479,7 @@ irc_try_write_ssl (struct connection *conn)
 | 
			
		||||
			str_remove_slice (buf, 0, n_written);
 | 
			
		||||
			continue;
 | 
			
		||||
		case SSL_ERROR_ZERO_RETURN:
 | 
			
		||||
			connection_abort (conn, NULL);
 | 
			
		||||
			connection_kill (conn, NULL);
 | 
			
		||||
			return false;
 | 
			
		||||
		case SSL_ERROR_WANT_WRITE:
 | 
			
		||||
			return true;
 | 
			
		||||
@@ -490,7 +490,7 @@ irc_try_write_ssl (struct connection *conn)
 | 
			
		||||
			continue;
 | 
			
		||||
		default:
 | 
			
		||||
			print_debug ("%s: %s: %s", __func__, "SSL_write", error_info);
 | 
			
		||||
			connection_abort (conn, error_info);
 | 
			
		||||
			connection_kill (conn, error_info);
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
@@ -506,7 +506,7 @@ on_irc_client_ready (const struct pollfd *pfd, void *user_data)
 | 
			
		||||
		hard_assert (pfd->events == POLLIN);
 | 
			
		||||
		if (irc_autodetect_ssl (conn) && !connection_initialize_ssl (conn))
 | 
			
		||||
		{
 | 
			
		||||
			connection_abort (conn, NULL);
 | 
			
		||||
			connection_kill (conn, NULL);
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
		conn->initialized = true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user