mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 03:40:11 +01:00
cloud-setup/trivial: rename timeout_ms to timeout_msec
I think "ms" as abbreviation is too short and unclear. Also, it's
not used consistently. Rename variable.
(cherry picked from commit 13741aa952)
This commit is contained in:
parent
490c46e527
commit
3e77f0a5a8
4 changed files with 13 additions and 13 deletions
|
|
@ -156,7 +156,7 @@ _wait_for_objects_iterate_until_done_idle_cb (gpointer user_data)
|
|||
/**
|
||||
* nmcs_wait_for_objects_iterate_until_done:
|
||||
* @context: the #GMainContext to iterate.
|
||||
* @timeout_ms: timeout or -1 for no timeout.
|
||||
* @timeout_msec: timeout or -1 for no timeout.
|
||||
*
|
||||
* Iterates the provided @context until all objects that we wait for
|
||||
* are destroyed.
|
||||
|
|
@ -169,7 +169,7 @@ _wait_for_objects_iterate_until_done_idle_cb (gpointer user_data)
|
|||
*/
|
||||
gboolean
|
||||
nmcs_wait_for_objects_iterate_until_done (GMainContext *context,
|
||||
int timeout_ms)
|
||||
int timeout_msec)
|
||||
{
|
||||
nm_auto_unref_gmainloop GMainLoop *loop = g_main_loop_new (context, FALSE);
|
||||
nm_auto_destroy_and_unref_gsource GSource *timeout_source = NULL;
|
||||
|
|
@ -189,8 +189,8 @@ nmcs_wait_for_objects_iterate_until_done (GMainContext *context,
|
|||
.got_timeout = FALSE,
|
||||
};
|
||||
|
||||
if (timeout_ms >= 0) {
|
||||
timeout_source = nm_g_source_attach (nm_g_timeout_source_new (timeout_ms,
|
||||
if (timeout_msec >= 0) {
|
||||
timeout_source = nm_g_source_attach (nm_g_timeout_source_new (timeout_msec,
|
||||
G_PRIORITY_DEFAULT,
|
||||
_wait_for_objects_iterate_until_done_timeout_cb,
|
||||
&data,
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void _nm_log_impl_cs (NMLogLevel level,
|
|||
gpointer nmcs_wait_for_objects_register (gpointer target);
|
||||
|
||||
gboolean nmcs_wait_for_objects_iterate_until_done (GMainContext *context,
|
||||
int timeout_ms);
|
||||
int timeout_msec);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ _get_cancelled_cb (GObject *object, gpointer user_data)
|
|||
void
|
||||
nm_http_client_get (NMHttpClient *self,
|
||||
const char *url,
|
||||
int timeout_ms,
|
||||
int timeout_msec,
|
||||
gssize max_data,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
|
|
@ -271,7 +271,7 @@ nm_http_client_get (NMHttpClient *self,
|
|||
g_return_if_fail (NM_IS_HTTP_CLIENT (self));
|
||||
g_return_if_fail (url);
|
||||
g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
|
||||
g_return_if_fail (timeout_ms >= 0);
|
||||
g_return_if_fail (timeout_msec >= 0);
|
||||
g_return_if_fail (max_data >= -1);
|
||||
|
||||
priv = NM_HTTP_CLIENT_GET_PRIVATE (self);
|
||||
|
|
@ -303,9 +303,9 @@ nm_http_client_get (NMHttpClient *self,
|
|||
curl_easy_setopt (edata->ehandle, CURLOPT_WRITEDATA, edata);
|
||||
curl_easy_setopt (edata->ehandle, CURLOPT_PRIVATE, edata);
|
||||
|
||||
if (timeout_ms > 0) {
|
||||
if (timeout_msec > 0) {
|
||||
edata->timeout_source = _source_attach (self,
|
||||
nm_g_timeout_source_new (timeout_ms,
|
||||
nm_g_timeout_source_new (timeout_msec,
|
||||
G_PRIORITY_DEFAULT,
|
||||
_get_timeout_cb,
|
||||
edata,
|
||||
|
|
@ -653,15 +653,15 @@ _mhandle_timeout_cb (gpointer user_data)
|
|||
}
|
||||
|
||||
static int
|
||||
_mhandle_timerfunction_cb (CURLM *multi, long timeout_ms, void *user_data)
|
||||
_mhandle_timerfunction_cb (CURLM *multi, long timeout_msec, void *user_data)
|
||||
{
|
||||
NMHttpClient *self = user_data;
|
||||
NMHttpClientPrivate *priv = NM_HTTP_CLIENT_GET_PRIVATE (self);
|
||||
|
||||
nm_clear_pointer (&priv->mhandle_source_timeout, nm_g_source_destroy_and_unref);
|
||||
if (timeout_ms >= 0) {
|
||||
if (timeout_msec >= 0) {
|
||||
priv->mhandle_source_timeout = _source_attach (self,
|
||||
nm_g_timeout_source_new (NM_MIN (timeout_ms, G_MAXINT),
|
||||
nm_g_timeout_source_new (NM_MIN (timeout_msec, G_MAXINT),
|
||||
G_PRIORITY_DEFAULT,
|
||||
_mhandle_timeout_cb,
|
||||
self,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ GMainContext *nm_http_client_get_main_context (NMHttpClient *self);
|
|||
|
||||
void nm_http_client_get (NMHttpClient *self,
|
||||
const char *uri,
|
||||
int timeout_ms,
|
||||
int timeout_msec,
|
||||
gssize max_data,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue