Logo Search packages:      
Sourcecode: libmpdclient version File versions  Download package

void mpd_connection_free ( struct mpd_connection connection  ) 

Close the connection and free all memory.

Parameters:
connection the connection to MPD

Definition at line 298 of file connection.c.

References mpd_connection::async, mpd_connection::error, mpd_async_free(), mpd_connection_free(), mpd_connection::pair_state, mpd_connection::PAIR_STATE_FLOATING, mpd_connection::parser, and mpd_connection::request.

Referenced by mpd_connection_free().

{
      assert(connection->pair_state != PAIR_STATE_FLOATING);

      if (connection->parser != NULL)
            mpd_parser_free(connection->parser);

      if (connection->async != NULL)
            mpd_async_free(connection->async);

      if (connection->request) free(connection->request);

      mpd_error_deinit(&connection->error);

      free(connection);
}


Generated by  Doxygen 1.6.0   Back to index