WIP: pth, cleanup, transistion mostly done
[rxpd] / src / rxpd_connection.c
index 1f048be79204100cf5c89b6d33f4f7a52a952483..770ef8bbe26f4f4be3d54e63a41c27620620bdbe 100644 (file)
@@ -51,8 +51,6 @@ rxpd_connection_delete (struct rxpd_connection* self)
 {
   if (self)
     {
-      // TODO kill connecter if not self
-
       close (self->fd);
       free (self->tmp_str);
       LLIST_WHILE_HEAD (&self->tmp_list, n)
@@ -202,9 +200,10 @@ rxpd_connection_parse_cmd (void* ptr)
     {
 #define RXPD_CMD(cmd, _)                        \
 case RXPD_CMD_##cmd:                            \
-  return rxpd_connection_cmd_##cmd (ptr);       \
-
+   rxpd_connection_cmd_##cmd (self);            \
+   rxpd_connection_delete (self);               \
   break;
+
       RXPD_COMMANDS
 #undef RXPD_CMD
     }