Author: jsuchome Date: Fri Jul 27 13:38:38 2007 New Revision: 39743 URL: http://svn.opensuse.org/viewcvs/yast?rev=39743&view=rev Log: - do not call the ntp-client directly to prevent segfault (#294773) - 2.15.14 Modified: trunk/country/VERSION trunk/country/package/yast2-country.changes trunk/country/timezone/src/dialogs.ycp Modified: trunk/country/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/VERSION?rev=39743&r1=39742&r2=39743&view=diff ============================================================================== --- trunk/country/VERSION (original) +++ trunk/country/VERSION Fri Jul 27 13:38:38 2007 @@ -1 +1 @@ -2.15.13 +2.15.14 Modified: trunk/country/package/yast2-country.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/package/yast2-country.changes?rev=39743&r1=39742&r2=39743&view=diff ============================================================================== --- trunk/country/package/yast2-country.changes (original) +++ trunk/country/package/yast2-country.changes Fri Jul 27 13:38:38 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Jul 27 13:24:50 CEST 2007 - jsuchome@suse.cz + +- do not call the ntp-client directly to prevent segfault (#294773) +- 2.15.14 + +------------------------------------------------------------------- Fri Jul 27 10:10:58 CEST 2007 - jsuchome@suse.cz - timezone dialog offers synchronization with NTP (F302192) Modified: trunk/country/timezone/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/timezone/src/dialogs.ycp?rev=39743&r1=39742&r2=39743&view=diff ============================================================================== --- trunk/country/timezone/src/dialogs.ycp (original) +++ trunk/country/timezone/src/dialogs.ycp Fri Jul 27 13:38:38 2007 @@ -139,7 +139,23 @@ } /** - * read the settings of ntp client (we only need current list of servers) + * get the list of ntp servers from current ntp-client instance + */ + list get_current_ntp_settings () { + + list ret = []; + map ex = (map)WFM::CallFunction ("ntp-client_auto", ["Export"]); + if (ex == nil) return ret; + foreach (map peer, ex["peers"]:[], { + if (peer["type"]:"" == "server") + ret = add (ret, peer["address"]:""); + }); + return ret; + } + + /** + * read current NTP settings (using yast2-ntp-client) + * and fill the list of servers */ boolean read_ntp_settings () { @@ -153,11 +169,7 @@ } else { - map ex = (map)WFM::CallFunction ("ntp-client_auto", ["Export"]); - foreach (map peer, ex["peers"]:[], { - if (peer["type"]:"" == "server") - ntp_items = add (ntp_items, peer["address"]:""); - }); + ntp_items = get_current_ntp_settings (); } if (ntp_used && ntp_items == []) ntp_items = ntp_items_proposal (); @@ -273,15 +285,10 @@ } if (ret == `ntp_configure) { - if (WFM::CallFunction ("ntp-client", []) != true) + if (WFM::CallFunction ("ntp-client_auto", ["Change"]) != `next) continue; // read current settings again - if (!read_ntp_settings ()) - { - UI::ChangeWidget (`id (`manual), `Value, true); - UI::ChangeWidget (`id (`ntp), `Value, false); - continue; - } + ntp_items = get_current_ntp_settings (); UI::ChangeWidget (`id (`ntp_address), `Items, ntp_items); // adapt current time after the attempt to synchronize val = Timezone::GetDateTimeMap(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org