author | tille <tille> | 2003-06-16 17:07:09 (UTC) |
---|---|---|
committer | tille <tille> | 2003-06-16 17:07:09 (UTC) |
commit | 020c6d76b3faad399164ba196c51804221a259e1 (patch) (unidiff) | |
tree | 7b9aef94a9ec3fad7a16201d56c4a4b32ac39a09 | |
parent | 3508149e0c894e53bc31ee7b66d98a195cdb8d70 (diff) | |
download | opie-020c6d76b3faad399164ba196c51804221a259e1.zip opie-020c6d76b3faad399164ba196c51804221a259e1.tar.gz opie-020c6d76b3faad399164ba196c51804221a259e1.tar.bz2 |
remove qFatal in case of unknow interface.
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index e34f0ce..371b689 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -125,49 +125,51 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
125 | qDebug("WLANModule got %i params", count ); | 125 | qDebug("WLANModule got %i params", count ); |
126 | if (count < 2){ | 126 | if (count < 2){ |
127 | qDebug("Erorr less than 2 parameter"); | 127 | qDebug("Erorr less than 2 parameter"); |
128 | qDebug("RETURNING"); | 128 | qDebug("RETURNING"); |
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | 131 | ||
132 | QDataStream stream(arg,IO_ReadOnly); | 132 | QDataStream stream(arg,IO_ReadOnly); |
133 | QString interface; | 133 | QString interface; |
134 | QString action; | 134 | QString action; |
135 | while (! stream.atEnd() ){ | 135 | while (! stream.atEnd() ){ |
136 | stream >> interface; | 136 | stream >> interface; |
137 | stream >> action; | 137 | stream >> action; |
138 | qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); | 138 | qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); |
139 | // find interfaces | 139 | // find interfaces |
140 | Interface *ifa=0; | 140 | Interface *ifa=0; |
141 | for ( Interface *i=list.first(); i != 0; i=list.next() ){ | 141 | for ( Interface *i=list.first(); i != 0; i=list.next() ){ |
142 | if (i->getInterfaceName() == interface){ | 142 | if (i->getInterfaceName() == interface){ |
143 | qDebug("WLANModule found interface %s",interface.latin1()); | 143 | qDebug("WLANModule found interface %s",interface.latin1()); |
144 | ifa = i; | 144 | ifa = i; |
145 | } | 145 | } |
146 | } | 146 | } |
147 | 147 | ||
148 | if (ifa == 0){ | 148 | if (ifa == 0){ |
149 | qFatal("WLANModule Did not find %s",interface.latin1()); | 149 | qDebug("WLANModule Did not find %s",interface.latin1()); |
150 | qDebug("returning"); | ||
151 | return; | ||
150 | } | 152 | } |
151 | 153 | ||
152 | if (count == 2){ | 154 | if (count == 2){ |
153 | // those should call the interface directly | 155 | // those should call the interface directly |
154 | QWidget *info = getInfo( ifa ); | 156 | QWidget *info = getInfo( ifa ); |
155 | info->showMaximized(); | 157 | info->showMaximized(); |
156 | 158 | ||
157 | if ( action.contains("start" ) ){ | 159 | if ( action.contains("start" ) ){ |
158 | ifa->start(); | 160 | ifa->start(); |
159 | } else if ( action.contains("restart" ) ){ | 161 | } else if ( action.contains("restart" ) ){ |
160 | ifa->restart(); | 162 | ifa->restart(); |
161 | } else if ( action.contains("stop" ) ){ | 163 | } else if ( action.contains("stop" ) ){ |
162 | ifa->stop(); | 164 | ifa->stop(); |
163 | }else if ( action.contains("refresh" ) ){ | 165 | }else if ( action.contains("refresh" ) ){ |
164 | ifa->refresh(); | 166 | ifa->refresh(); |
165 | } | 167 | } |
166 | }else if (count == 3){ | 168 | }else if (count == 3){ |
167 | QString value; | 169 | QString value; |
168 | if (!wlanconfigWiget){ | 170 | if (!wlanconfigWiget){ |
169 | //FIXME: what if it got closed meanwhile? | 171 | //FIXME: what if it got closed meanwhile? |
170 | wlanconfigWiget = (WLANImp*) configure(ifa); | 172 | wlanconfigWiget = (WLANImp*) configure(ifa); |
171 | } | 173 | } |
172 | wlanconfigWiget->showMaximized(); | 174 | wlanconfigWiget->showMaximized(); |
173 | stream >> value; | 175 | stream >> value; |