<commit_before>
#include "cw/capwap.h"
#include "cw/conn.h"
#include "wtp_interface.h"

int configure()
{

	struct conn * conn = get_conn();
	cw_send_request(conn,CW_MSG_CONFIGURATION_STATUS_REQUEST);



/*	struct wtpinfo * wtpinfo = get_wtpinfo();

	struct radioinfo *rip = &(wtpinfo->radioinfo[0]);

	cw_prepare_configuration_status_request(conn,rip,wtpinfo);
	struct cwrmsg * cwrmsg = conn_send_request(conn);

	int rc = cw_readmsg_configuration_status_response(cwrmsg->msgelems,cwrmsg->msgelems_len);

	printf("Chage Sate\n");
	cw_prepare_change_state_event_request(conn,rip,wtpinfo);
	cwrmsg = conn_send_request(conn);


	printf("Got change resp %p\n",cwrmsg);
*/
	return 0;
}

<commit_msg>Fixed error handling.<commit_after>
#include "cw/capwap.h"
#include "cw/conn.h"
#include "cw/log.h"

#include "wtp_interface.h"

int configure()
{

	struct conn * conn = get_conn();
	int rc = cw_send_request(conn,CW_MSG_CONFIGURATION_STATUS_REQUEST);

	if (!cw_rcok(rc)) {
		if (rc > 0) {
			cw_log(LOG_ERR, "Error sending Configuration Status Request to AC at %s, AC said: %d - %s.",
			       sock_addr2str(&conn->addr), rc, cw_strerror(rc));

		} else {
			cw_log(LOG_ERR, "Error sending Configuration Status Request to AC at %s: %d - %s.",
			       sock_addr2str(&conn->addr), errno, cw_strerror(rc));
		}
		return 0;
	}

	return 1;
}


{'fraction_non_alphanumeric': 0.14221556886227546, 'fraction_numerical': 0.005239520958083832, 'mean_word_length': 4.915929203539823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4511663', 'n_tokens_mistral': 562, 'n_tokens_neox': 524, 'n_words': 103}