if (error) {
VLOG_INFO_RL(&rl, "%s: failed to queue default flows (%s)",
rconn_get_name(rconn), strerror(error));
- ofpbuf_delete(msg);
}
}
}
}
-/* Sends 'b' on 'rc'. Returns 0 if successful (in which case 'b' is
- * destroyed), or ENOTCONN if 'rc' is not currently connected (in which case
- * the caller retains ownership of 'b').
+/* Sends 'b' on 'rc'. Returns 0 if successful, or ENOTCONN if 'rc' is not
+ * currently connected. Takes ownership of 'b'.
*
* If 'counter' is non-null, then 'counter' will be incremented while the
* packet is in flight, then decremented when it has been sent (or discarded
}
return 0;
} else {
+ ofpbuf_delete(b);
return ENOTCONN;
}
}
retval = counter->n >= queue_limit ? EAGAIN : rconn_send(rc, b, counter);
if (retval) {
COVERAGE_INC(rconn_overflow);
- ofpbuf_delete(b);
}
return retval;
}
struct rconn_packet_counter *counter)
{
update_openflow_length(msg);
- if (rconn_send(ofconn->rconn, msg, counter)) {
- ofpbuf_delete(msg);
- }
+ rconn_send(ofconn->rconn, msg, counter);
}
\f
/* Sending asynchronous messages. */