net: remove CONFIG_MARS_NET_COMPAT from upstream

This commit is contained in:
Thomas Schoebel-Theuer 2015-07-29 09:55:28 +02:00
parent 101c1759f4
commit e890b94741
1 changed files with 8 additions and 0 deletions

View File

@ -350,6 +350,7 @@ void mars_proto_check(struct mars_socket *msock)
u16 service_flags = 0; u16 service_flags = 0;
int status; int status;
// remove_this
#ifdef CONFIG_MARS_NET_COMPAT #ifdef CONFIG_MARS_NET_COMPAT
status = _mars_recv_raw(msock, &service_version, 1, 1, MSG_PEEK); status = _mars_recv_raw(msock, &service_version, 1, 1, MSG_PEEK);
if (unlikely(status < 0)) { if (unlikely(status < 0)) {
@ -363,6 +364,7 @@ void mars_proto_check(struct mars_socket *msock)
return; return;
} }
#endif #endif
// end_remove_this
status = _mars_recv_raw(msock, &service_version, 1, 1, 0); status = _mars_recv_raw(msock, &service_version, 1, 1, 0);
if (unlikely(status < 0)) { if (unlikely(status < 0)) {
MARS_DBG("#%d protocol exchange failed at receiving, status = %d\n", MARS_DBG("#%d protocol exchange failed at receiving, status = %d\n",
@ -392,11 +394,13 @@ int mars_proto_exchange(struct mars_socket *msock, const char *msg)
{ {
int status; int status;
// remove_this
#ifdef CONFIG_MARS_NET_COMPAT #ifdef CONFIG_MARS_NET_COMPAT
if (use_old_format) if (use_old_format)
return 0; return 0;
#endif #endif
// end_remove_this
msock->s_send_proto = SEND_PROTO_VERSION; msock->s_send_proto = SEND_PROTO_VERSION;
status = mars_send_raw(msock, &msock->s_send_proto, 1, false); status = mars_send_raw(msock, &msock->s_send_proto, 1, false);
if (unlikely(status < 0)) { if (unlikely(status < 0)) {
@ -1587,10 +1591,12 @@ int desc_send_struct(struct mars_socket *msock, const void *data, const struct m
int h_meta_len = 0; int h_meta_len = 0;
int status = -EINVAL; int status = -EINVAL;
// remove_this
#ifdef CONFIG_MARS_NET_COMPAT #ifdef CONFIG_MARS_NET_COMPAT
if (!msock->s_recv_proto) if (!msock->s_recv_proto)
return desc_send_struct_old(msock, data, meta, cork); return desc_send_struct_old(msock, data, meta, cork);
#endif #endif
// end_remove_this
for (i = 0; i < MAX_DESC_CACHE; i++) { for (i = 0; i < MAX_DESC_CACHE; i++) {
mc = msock->s_desc_send[i]; mc = msock->s_desc_send[i];
if (!mc) if (!mc)
@ -1623,10 +1629,12 @@ int desc_recv_struct(struct mars_socket *msock, void *data, const struct meta *m
int status = 0; int status = 0;
bool need_swap = false; bool need_swap = false;
// remove_this
#ifdef CONFIG_MARS_NET_COMPAT #ifdef CONFIG_MARS_NET_COMPAT
if (!msock->s_recv_proto) if (!msock->s_recv_proto)
return desc_recv_struct_old(msock, data, meta, line); return desc_recv_struct_old(msock, data, meta, line);
#endif #endif
// end_remove_this
status = mars_recv_raw(msock, &header, sizeof(header), sizeof(header)); status = mars_recv_raw(msock, &header, sizeof(header), sizeof(header));
_CHECK_STATUS("recv_header"); _CHECK_STATUS("recv_header");