hendrikw01 / tr-064

TR-064 - UPnP/IGD for node.js
Apache License 2.0
35 stars 24 forks source link

GetPhonebookList is kill FritzBox #17

Open BernadoEco opened 6 years ago

BernadoEco commented 6 years ago

I found a problem. If I retrieve the parameter "GetPhonebookList" 6-7 times, the FritzBox crashes. Here is my example code:

tr064.initTR064Device(IP, PORT, function (err, device) {
    if (!err) {
        device.startEncryptedCommunication(function (err, sslDev) {
            if (!err) {
                sslDev.login(USER, PASS);

                var wanppp = sslDev.services["urn:dslforum-org:service:X_AVM-DE_OnTel:1"];

                wanppp.actions.GetPhonebookList(function(err, ret) {
                    if (err) {
                        console.log(err);
                        return;
                    }
                        // GOT ID
                    if (ret.NewPhonebookList.length > 0) {

                        var LIST = [] = ret.NewPhonebookList.split(',');

                        for (var ID = 0; ID < LIST.length; ID++) {

                            wanppp.actions.GetPhonebook({
                                NewPhonebookID: ID
                            }, function (err, ret) {
                                if (err) {
                                    console.log(err);
                                    return;
                                }
                                if (ret.NewPhonebookURL && ret.NewPhonebookURL.length > 0) {
                                    // GOT URL
                                    var url = ret.NewPhonebookURL;
                                    console.log(url);
                                }
                            });

                        }

                    }
                });

            } else {
                console.log(err);
            }
        });
    }
});

Can anybody confirm this?

terenc3 commented 2 years ago

Nope. Used your provided script multiple times against a FRITZ!Box 7530 and it worked. But thanks for the snippet :)