~connman-maintainers/connman/head

« back to all changes in this revision

Viewing changes to src/service.c

  • Committer: Marcel Holtmann
  • Author(s): Grant Erickson
  • Date: 2023-11-23 11:25:24 UTC
  • Revision ID: git-v1:f443a93417c7f375842a8c13cec47ebac87297a3
service: Document 'handle_online_check_{failure,success}'.

This adds documentation to the 'handle_online_check_{failure,success}'
functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1926
1926
                online_check_state->interval++;
1927
1927
}
1928
1928
 
 
1929
/**
 
1930
 *  @brief
 
1931
 *    Handle the successful completion of an "online" HTTP-based
 
1932
 *    Internet reachability check for the specified network service
 
1933
 *    and IP configuration type.
 
1934
 *
 
1935
 *  This handles the completion of a successful "online" HTTP-based
 
1936
 *  Internet reachability check for the specified network service and
 
1937
 *  IP configuration type. This effectively "bookends" an earlier
 
1938
 *  #__connman_service_wispr_start.
 
1939
 *
 
1940
 *  @param[in,out]  service             A pointer to the mutable service
 
1941
 *                                      for which to handle a
 
1942
 *                                      successful previously-requested
 
1943
 *                                      online check.
 
1944
 *  @param[in]      type                The IP configuration type for
 
1945
 *                                      which to handle a successful
 
1946
 *                                      previously-requested online
 
1947
 *                                      check.
 
1948
 *  @param[in,out]  online_check_state  A pointer to the online check
 
1949
 *                                      state for @a service
 
1950
 *                                      associated with @a type.
 
1951
 *  @param[in]      oneshot             A Boolean indicating whether the
 
1952
 *                                      online check mode is
 
1953
 *                                      "one-shot" (true) or
 
1954
 *                                      "continuous" (false).
 
1955
 *
 
1956
 *  @returns
 
1957
 *    True if another online check should be scheduled; otherwise,
 
1958
 *    false.
 
1959
 *
 
1960
 *  @sa handle_online_check_failure
 
1961
 *
 
1962
 */
1929
1963
static bool handle_online_check_success(struct connman_service *service,
1930
1964
                                enum connman_ipconfig_type type,
1931
1965
                                struct online_check_state *online_check_state,
1950
1984
        return reschedule;
1951
1985
}
1952
1986
 
 
1987
/**
 
1988
 *  @brief
 
1989
 *    Handle the failed completion of an "online" HTTP-based
 
1990
 *    Internet reachability check for the specified network service
 
1991
 *    and IP configuration type.
 
1992
 *
 
1993
 *  This handles the completion of a failed "online" HTTP-based
 
1994
 *  Internet reachability check for the specified network service and
 
1995
 *  IP configuration type. This effectively "bookends" an earlier
 
1996
 *  #__connman_service_wispr_start.
 
1997
 *
 
1998
 *  @param[in,out]  service             A pointer to the mutable service
 
1999
 *                                      for which to handle a
 
2000
 *                                      failed previously-requested
 
2001
 *                                      online check.
 
2002
 *  @param[in]      type                The IP configuration type for
 
2003
 *                                      which to handle a failed
 
2004
 *                                      previously-requested online
 
2005
 *                                      check.
 
2006
 *  @param[in]      ipconfig_state      The current @a type IP
 
2007
 *                                      configuration state for @a
 
2008
 *                                      service.
 
2009
 *  @param[in,out]  online_check_state  A pointer to the online check
 
2010
 *                                      state for @a service
 
2011
 *                                      associated with @a type.
 
2012
 *  @param[in]      oneshot             A Boolean indicating whether the
 
2013
 *                                      online check mode is
 
2014
 *                                      "one-shot" (true) or
 
2015
 *                                      "continuous" (false).
 
2016
 *  @param[in]      err                 The error status associated with
 
2017
 *                                      the failed previously-requested
 
2018
 *                                      online check. This is expected
 
2019
 *                                      to be less than zero ('< 0').
 
2020
 *
 
2021
 *  @returns
 
2022
 *    True if another online check should be scheduled; otherwise,
 
2023
 *    false.
 
2024
 *
 
2025
 *  @sa handle_online_check_success
 
2026
 *
 
2027
 */
1953
2028
static bool handle_online_check_failure(struct connman_service *service,
1954
2029
                                enum connman_ipconfig_type type,
1955
2030
                                enum connman_service_state ipconfig_state,