It's working now.
FossilOrigin-Name: dfba94ec67d3caf4a8544d62f5e8379d4d049290c686b11fc9e7884b8ebb885d
This commit is contained in:
		| @ -7,36 +7,22 @@ | |||||||
| #include "log.h" | #include "log.h" | ||||||
| #include "capwap_items.h" | #include "capwap_items.h" | ||||||
|  |  | ||||||
| int cw_in_check_generic_resp(struct conn *conn, struct cw_action_in *a, uint8_t * data, | int cw_in_check_generic_req(struct conn *conn, struct cw_action_in *a, uint8_t * data, | ||||||
| 			 int len,struct sockaddr *from) | 			 int len,struct sockaddr *from) | ||||||
| { | { | ||||||
|  |  | ||||||
| 	cw_action_in_t * mlist[60]; | 	cw_action_in_t * mlist[60]; | ||||||
|  |  | ||||||
| 	/* Check if the message contains a result code and |  | ||||||
| 	   if it indicates an errror */ |  | ||||||
| 	mbag_item_t * result = mbag_get(conn->incomming,CW_ITEM_RESULT_CODE); |  | ||||||
| 	if  (result ) { |  | ||||||
| 		if (!cw_rcok(result->dword)){ |  | ||||||
| 			return result->dword; |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
|  |  | ||||||
| 	/* Check for mandatory elements */ | 	/* Check for mandatory elements */ | ||||||
| 	int n = cw_check_missing_mand(mlist,conn,a); | 	int n = cw_check_missing_mand(mlist,conn,a); | ||||||
| 	if (n && conn->strict_capwap) { |  | ||||||
| 		cw_dbg_missing_mand(DBG_MSG_ERR,conn,mlist,n,a); |  | ||||||
| 		errno=EAGAIN; |  | ||||||
| 		return -1; /* CW_RESULT_MISSING_MAND_ELEM */ |  | ||||||
| 	} |  | ||||||
| 	if (n) { | 	if (n) { | ||||||
|  | 		if ( conn->strict_capwap ){ | ||||||
|  | 			cw_dbg_missing_mand(DBG_MSG_ERR,conn,mlist,n,a); | ||||||
|  | 			return CW_RESULT_MISSING_MAND_ELEM; | ||||||
|  | 		} | ||||||
| 		cw_dbg_missing_mand(DBG_RFC,conn,mlist,n,a); | 		cw_dbg_missing_mand(DBG_RFC,conn,mlist,n,a); | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	/* if we hava a result code, return it */ |  | ||||||
| 	if ( result )  |  | ||||||
| 		return result->dword; |  | ||||||
|  |  | ||||||
| 	return 0; | 	return 0; | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user