Fixed error handling.
FossilOrigin-Name: 9d979c728950303579bb2efee89166e6fd387df9aee658e3048d78cf515379db
This commit is contained in:
parent
ec5f756be3
commit
2c24b79691
@ -1,32 +1,28 @@
|
||||
|
||||
#include "cw/capwap.h"
|
||||
#include "cw/conn.h"
|
||||
#include "cw/log.h"
|
||||
|
||||
#include "wtp_interface.h"
|
||||
|
||||
int configure()
|
||||
{
|
||||
|
||||
struct conn * conn = get_conn();
|
||||
cw_send_request(conn,CW_MSG_CONFIGURATION_STATUS_REQUEST);
|
||||
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;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user