All pastes #828971 Raw Edit

Miscellany

public text v1 · immutable
#828971 ·published 2007-12-22 21:17 UTC
rendered paste body
foreach ($a_int as $key => $conf) {
                $int = $conf['interface'];
                /*
                 * XXX: The code below does not work.
                 * Is it me or PHP is a hell of a BUG?!
                 * Maybe PHP5 fixes something we will see!!!!
                 */
                 if ($int && isset($conf['attachtoqueue']))  {
                         $root = &$altq_list_queues[$int];
                         $qtmp = $root->find_queue($int, $conf['attachtoqueue']);
//                       var_dump($qtmp);
                         $qtmp->add_queue($int, $conf);
                 }

                if ($int && !isset($conf['attachtoqueue'])) {
                        $root = new altq_root_queue();
                        $root->SetInterface($int);
                        $root->ReadConfig($conf);
                        //read_altq_config_sub($int, $root->GetQname(), &$conf);
                        /* foreach ($a_sint as $key => $q) {
                                if ($q['interface'] == $root->GetInterface() &&
                                        $q['attachtoqueue'])
                                        $tmp = $root->add_queue($root->GetInterface(),
$q);
                        } */

                        $altq_list_queues[$root->GetInterface()] = $root;
                }
        }