]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap, pop3: Added an assert to client_connected().
authorPascal Volk <user@localhost.localdomain.org>
Wed, 30 Jun 2010 18:49:23 +0000 (18:49 +0000)
committerPascal Volk <user@localhost.localdomain.org>
Wed, 30 Jun 2010 18:49:23 +0000 (18:49 +0000)
--HG--
branch : HEAD

src/imap/main.c
src/pop3/main.c

index bf9f084fa0a43b70a72f8ee6e3fcc02dbe14b1fa..149518778c36c592c06f43d172a14cfd01f177c0 100644 (file)
@@ -278,12 +278,11 @@ static void login_client_failed(const struct master_login_client *client,
 
 static void client_connected(struct master_service_connection *conn)
 {
-       if (master_login == NULL) {
-               /* running standalone, we shouldn't even get here */
-       } else {
-               master_service_client_connection_accept(conn);
-               master_login_add(master_login, conn->fd);
-       }
+       /* when running standalone, we shouldn't even get here */
+       i_assert(master_login != NULL);
+
+       master_service_client_connection_accept(conn);
+       master_login_add(master_login, conn->fd);
 }
 
 int main(int argc, char *argv[])
index a9f7d43e485dd013ec16f334472899b218b3511a..1cb55b065aa26a467b88af271dfd513931e2d436 100644 (file)
@@ -174,12 +174,11 @@ static void login_client_failed(const struct master_login_client *client,
 
 static void client_connected(struct master_service_connection *conn)
 {
-       if (master_login == NULL) {
-               /* running standalone, we shouldn't even get here */
-       } else {
-               master_service_client_connection_accept(conn);
-               master_login_add(master_login, conn->fd);
-       }
+       /* when running standalone, we shouldn't even get here */
+       i_assert(master_login != NULL);
+
+       master_service_client_connection_accept(conn);
+       master_login_add(master_login, conn->fd);
 }
 
 int main(int argc, char *argv[])