-rw-r--r-- | noncore/net/opiestumbler/opiestumbler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/net/opiestumbler/opiestumbler.cpp b/noncore/net/opiestumbler/opiestumbler.cpp index 9b0d099..ab0b8d8 100644 --- a/noncore/net/opiestumbler/opiestumbler.cpp +++ b/noncore/net/opiestumbler/opiestumbler.cpp | |||
@@ -321,49 +321,50 @@ void OpieStumbler::slotAssociated() | |||
321 | if( !wiface ) { | 321 | if( !wiface ) { |
322 | slotCleanSplash(); | 322 | slotCleanSplash(); |
323 | return; | 323 | return; |
324 | } | 324 | } |
325 | 325 | ||
326 | if (!wiface->isAssociated()) { | 326 | if (!wiface->isAssociated()) { |
327 | Global::statusMessage(tr("Could not Join")); | 327 | Global::statusMessage(tr("Could not Join")); |
328 | m_infoLabel->setText(tr("Could not Join")); | 328 | m_infoLabel->setText(tr("Could not Join")); |
329 | QTimer::singleShot(5000, this, SLOT(slotCleanSplash())); | 329 | QTimer::singleShot(5000, this, SLOT(slotCleanSplash())); |
330 | return; | 330 | return; |
331 | } | 331 | } |
332 | 332 | ||
333 | Global::statusMessage(tr("Joined")); | 333 | Global::statusMessage(tr("Joined")); |
334 | m_pbar->setProgress(2); | 334 | m_pbar->setProgress(2); |
335 | m_infoLabel->setText(QString("<center><b>%1 %2</b></center>").arg(tr("Joined Network")).arg(m_ssid)); | 335 | m_infoLabel->setText(QString("<center><b>%1 %2</b></center>").arg(tr("Joined Network")).arg(m_ssid)); |
336 | 336 | ||
337 | if(m_proc) { | 337 | if(m_proc) { |
338 | m_proc->kill(); | 338 | m_proc->kill(); |
339 | delete m_proc; | 339 | delete m_proc; |
340 | } | 340 | } |
341 | 341 | ||
342 | m_proc = new Opie::Core::OProcess(this); | 342 | m_proc = new Opie::Core::OProcess(this); |
343 | 343 | ||
344 | *m_proc << "udhcpc" << "-f" << "-n" << "-i" << m_interface; | 344 | *m_proc << "udhcpc" << "-f" << "-n" << "-i" << m_interface; |
345 | m_proc->start(Opie::Core::OProcess::DontCare); | 345 | if (!m_proc->start(Opie::Core::OProcess::DontCare)) |
346 | owarn << "Execution of udhcpc returned false. Are paths correct?" << oendl; | ||
346 | QTimer::singleShot(5000, this, SLOT(slotCheckDHCP())); | 347 | QTimer::singleShot(5000, this, SLOT(slotCheckDHCP())); |
347 | } | 348 | } |
348 | 349 | ||
349 | void OpieStumbler::slotCheckDHCP() | 350 | void OpieStumbler::slotCheckDHCP() |
350 | { | 351 | { |
351 | if(!m_proc->isRunning()) { | 352 | if(!m_proc->isRunning()) { |
352 | Global::statusMessage(tr("Could not Obtain an Address")); | 353 | Global::statusMessage(tr("Could not Obtain an Address")); |
353 | m_infoLabel->setText(QString("<center><b>%1</b></center>").arg(tr("Could not Obtain an Address"))); | 354 | m_infoLabel->setText(QString("<center><b>%1</b></center>").arg(tr("Could not Obtain an Address"))); |
354 | delete m_proc; | 355 | delete m_proc; |
355 | m_proc = NULL; | 356 | m_proc = NULL; |
356 | QTimer::singleShot(5000, this, SLOT(slotCleanSplash())); | 357 | QTimer::singleShot(5000, this, SLOT(slotCleanSplash())); |
357 | return; | 358 | return; |
358 | } | 359 | } |
359 | m_listCurrent->show(); | 360 | m_listCurrent->show(); |
360 | m_pbar->setProgress(3); | 361 | m_pbar->setProgress(3); |
361 | 362 | ||
362 | OWirelessNetworkInterface *wiface = static_cast<OWirelessNetworkInterface*>(ONetwork::instance()->interface(m_interface)); | 363 | OWirelessNetworkInterface *wiface = static_cast<OWirelessNetworkInterface*>(ONetwork::instance()->interface(m_interface)); |
363 | QString ipv4 = wiface->ipV4Address().toString(); | 364 | QString ipv4 = wiface->ipV4Address().toString(); |
364 | m_infoLabel->setText(QString("<center><b>%1 %2</b></center>").arg(tr("Obtained IP")).arg(ipv4)); | 365 | m_infoLabel->setText(QString("<center><b>%1 %2</b></center>").arg(tr("Obtained IP")).arg(ipv4)); |
365 | Global::statusMessage(tr("Obtained IP") + " " + ipv4); | 366 | Global::statusMessage(tr("Obtained IP") + " " + ipv4); |
366 | QTimer::singleShot(5000, this, SLOT(slotCleanSplash())); | 367 | QTimer::singleShot(5000, this, SLOT(slotCleanSplash())); |
367 | 368 | ||
368 | } | 369 | } |
369 | 370 | ||