}
}
-/* 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;
}