Hi Evan,
Good to see someone is reading :)
Yes, the flow was changed slightly. All the code above this builds up the string
for viewing in the tooltip on gnome-netstatus, but the last one, with a valid
iface_name, should read:
Network Connection: <iface_name>
or, if iface_name == NULL, simply
Network Connect
The previous code didn't handle this correctly, so the flow was slightly
modified moving this last part outside the check for a NULL iface object to
correctly set the string regardless of the value of iface.
Could have been bad though if it wasn't intentional ;)
Thanks,
Darren.
Evan Yan wrote:
> Hi Darren,
>
>> g_string_append(tooltip_markup, "\n");
>> }
>>
>> + }
>> + if ( iface_name != NULL ) {
>> g_string_append_printf(tooltip_markup, _("<b>%-20s</b>: %s"),
>> _("Network Connection"), iface_name );
>> }
>> else {
>
> Was the execution flow changed? I would expect a diff as follows for the
> null check.
>
> + if ( iface_name != NULL ) {
> g_string_append_printf(tooltip_markup, _("<b>%-20s</b>: %s"), _("Network
> Connection"), iface_name );
> + }
> }
>
>
> -Evan
>
> Darren Kenny wrote:
>> Simple fix, to check if iface_name is not NULL before using it.
>>
>>
>>