From: Ben Pfaff Date: Thu, 4 Sep 2008 16:48:27 +0000 (-0700) Subject: Simplify code by using rconn_send_with_limit() helper function. X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4870c3cc799669153516d4ebe7c43e623955bdd8;p=sliver-openvswitch.git Simplify code by using rconn_send_with_limit() helper function. --- diff --git a/switch/datapath.c b/switch/datapath.c index 7382d4c6d..953a30ba4 100644 --- a/switch/datapath.c +++ b/switch/datapath.c @@ -609,13 +609,10 @@ send_openflow_buffer(struct datapath *dp, struct buffer *buffer, int retval; update_openflow_length(buffer); - retval = (remote->n_txq < TXQ_LIMIT - ? rconn_send(rconn, buffer, &remote->n_txq) - : EAGAIN); + retval = rconn_send_with_limit(rconn, buffer, &remote->n_txq, TXQ_LIMIT); if (retval) { VLOG_WARN_RL(&rl, "send to %s failed: %s", rconn_get_name(rconn), strerror(retval)); - buffer_delete(buffer); } return retval; }