void htp_connp_destroy_all(htp_connp_t *connp) { if (connp == NULL) return; // Destroy connection htp_conn_destroy(connp->conn); connp->conn = NULL; // Destroy everything else htp_connp_destroy(connp); }
/** * Destroys the connection parser, its data structures, as well * as the connection and its transactions. * * @param connp */ void htp_connp_destroy_all(htp_connp_t *connp) { if (connp->conn != NULL) { // Destroy connection htp_conn_destroy(connp->conn); connp->conn = NULL; } // Destroy everything else htp_connp_destroy(connp); }
/** * Destroys the connection parser, its data structures, as well * as the connection and its transactions. * * @param connp */ void htp_connp_destroy_all(htp_connp_t *connp) { if (connp->conn == NULL) { fprintf(stderr, "HTP: htp_connp_destroy_all was invoked, but conn is NULL\n"); return; } // Destroy connection htp_conn_destroy(connp->conn); connp->conn = NULL; // Destroy everything else htp_connp_destroy(connp); }
/** * Creates a new configuration parser, making a copy of the supplied * configuration structure. * * @param cfg * @return A pointer to a newly created htp_connp_t instance. */ htp_connp_t *htp_connp_create_copycfg(htp_cfg_t *cfg) { htp_connp_t *connp = htp_connp_create(cfg); if (connp == NULL) return NULL; connp->cfg = htp_config_copy(cfg); if (connp->cfg == NULL) { htp_connp_destroy(connp); return NULL; } connp->is_cfg_private = 1; return connp; }