Send software version from local config
FossilOrigin-Name: 4f06ab7e20a2866a3d5f0af92b97b5e31ef279c5ab27cdb310d00581d50d5858
This commit is contained in:
		| @ -5,6 +5,7 @@ | |||||||
| #include "cw/capwap_items.h" | #include "cw/capwap_items.h" | ||||||
| #include "cw/cw.h" | #include "cw/cw.h" | ||||||
|  |  | ||||||
|  | extern mbag_t cisco_config; | ||||||
|  |  | ||||||
| int cisco_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t *dst)  | int cisco_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t *dst)  | ||||||
| { | { | ||||||
| @ -21,12 +22,13 @@ int cisco_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t * | |||||||
| 	d+=cw_put_ac_status(d ,(struct cw_ac_status*)(i->data),conn); | 	d+=cw_put_ac_status(d ,(struct cw_ac_status*)(i->data),conn); | ||||||
|  |  | ||||||
| 	 | 	 | ||||||
| 	/* Send back the same software as the WTP has, | 	/* Send back the same software version as the WTP has, | ||||||
| 	   otherwise the AP wants us to send an image */ | 	   otherwise the AP wants us to send an image */ | ||||||
|  |  | ||||||
| 	i = mbag_get(conn->incomming,CW_ITEM_WTP_SOFTWARE_VERSION); | 	//i = mbag_get(conn->incomming,CW_ITEM_WTP_SOFTWARE_VERSION); | ||||||
|  | 	 | ||||||
|  |  | ||||||
| 	//i = mbag_get(conn->local,CW_ITEM_AC_SOFTWARE_VERSION); | 	i = mbag_get(cisco_config,CW_ITEM_AC_SOFTWARE_VERSION); | ||||||
| 	if ( i ) {	 | 	if ( i ) {	 | ||||||
| 	 	d += cw_put_version(d,1,i->data); | 	 	d += cw_put_version(d,1,i->data); | ||||||
| 	} | 	} | ||||||
| @ -34,7 +36,7 @@ int cisco_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t * | |||||||
| 		cw_log(LOG_ERR, "Can't set Cisco Software Version in AC descriptor, No value defined."); | 		cw_log(LOG_ERR, "Can't set Cisco Software Version in AC descriptor, No value defined."); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	i = mbag_get(conn->local,CW_ITEM_AC_HARDWARE_VERSION); | 	i = mbag_get(cisco_config, CW_ITEM_AC_HARDWARE_VERSION); | ||||||
| 	if ( i ) {	 | 	if ( i ) {	 | ||||||
| 	 	d += cw_put_version(d,0,i->data); | 	 	d += cw_put_version(d,0,i->data); | ||||||
| 	} | 	} | ||||||
| @ -43,8 +45,6 @@ int cisco_out_ac_descriptor(struct conn *conn,struct cw_action_out * a,uint8_t * | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| 	int len = d-dst-4; | 	int len = d-dst-4; | ||||||
| 	 | 	 | ||||||
| 	return len + cw_put_elem_hdr(dst,a->elem_id,len); | 	return len + cw_put_elem_hdr(dst,a->elem_id,len); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user