Message ID | 20231128181551.1149522-1-gerickson@nuovations.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | ipconfig: Return a unique string for 'CONNMAN_IPCONFIG_TYPE_ALL'. | expand |
Hi Grant, > At commit 89f70d225df6 ("ipconfig: Define unique value for > CONNMAN_IPCONFIG_TYPE_ALL"), a unique enumertion value was provided > for 'CONNMAN_IPCONFIG_TYPE_ALL' to make it semantically different from > 'CONNMAN_IPCONFIG_TYPE_ALL'; however, a unique string returned > from '__connman_ipconfig_type2string' was not, leaving it to misleadingly > return "unknown" for 'CONNMAN_IPCONFIG_TYPE_ALL'. > > This addresses this oversight by returning a unique string for > 'CONNMAN_IPCONFIG_TYPE_ALL', "IPv4 + IPv6". > --- > src/ipconfig.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) patch has been applied. Regards Marcel
diff --git a/src/ipconfig.c b/src/ipconfig.c index 64a74310d450..352ea524dbd9 100644 --- a/src/ipconfig.c +++ b/src/ipconfig.c @@ -225,12 +225,13 @@ const char *__connman_ipconfig_type2string(enum connman_ipconfig_type type) { switch (type) { case CONNMAN_IPCONFIG_TYPE_UNKNOWN: - case CONNMAN_IPCONFIG_TYPE_ALL: return "unknown"; case CONNMAN_IPCONFIG_TYPE_IPV4: return "IPv4"; case CONNMAN_IPCONFIG_TYPE_IPV6: return "IPv6"; + case CONNMAN_IPCONFIG_TYPE_ALL: + return "IPv4 + IPv6"; } return NULL;