Bug fix: check pointer before using it. Fixed some spelling errors in messages presented to the user.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3939 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
8fc205bb13
commit
176f650876
|
@ -2673,6 +2673,8 @@ void SubscriptionModule::expireSubscriptions()
|
||||||
ObjList remove;
|
ObjList remove;
|
||||||
for (unsigned int i = 0; i < n ; i++) {
|
for (unsigned int i = 0; i < n ; i++) {
|
||||||
NamedString* ns = nl->getParam(i);
|
NamedString* ns = nl->getParam(i);
|
||||||
|
if (!ns)
|
||||||
|
continue;
|
||||||
NamedPointer* np = static_cast<NamedPointer*>(ns);
|
NamedPointer* np = static_cast<NamedPointer*>(ns);
|
||||||
EventUser* eu = static_cast<EventUser*>(np->userData());
|
EventUser* eu = static_cast<EventUser*>(np->userData());
|
||||||
if (!eu)
|
if (!eu)
|
||||||
|
@ -2777,7 +2779,7 @@ bool SubscriptionModule::commandExecute(String& retVal, const String& line)
|
||||||
String contact = "";
|
String contact = "";
|
||||||
// extractName(l.substr(user.length() + 2,-1),contact);
|
// extractName(l.substr(user.length() + 2,-1),contact);
|
||||||
if (user.null() || contact.null()) {
|
if (user.null() || contact.null()) {
|
||||||
retVal << "Espected <PresenceUser,Contact> pair";
|
retVal << "Expected <PresenceUser,Contact> pair";
|
||||||
DDebug(this,DebugInfo,"Command Execute 2 : return false user->null() || contact->null()");
|
DDebug(this,DebugInfo,"Command Execute 2 : return false user->null() || contact->null()");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2801,17 +2803,17 @@ bool SubscriptionModule::commandExecute(String& retVal, const String& line)
|
||||||
contact = static_cast<String*>(o->get());
|
contact = static_cast<String*>(o->get());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
retVal << "Espected <PresenceUser,Contact> pair";
|
retVal << "Expected <PresenceUser,Contact> pair";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
counter += 1;
|
counter += 1;
|
||||||
}
|
}
|
||||||
if (user->null() || contact->null()) {
|
if (user->null() || contact->null()) {
|
||||||
retVal << "Espected <PresenceUser,Contact> pair";
|
retVal << "Expected <PresenceUser,Contact> pair";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// TODO unsubscribe the user
|
// TODO unsubscribe the user
|
||||||
retVal << "PresenceUser: " << *user << " succesfuly unsubscribed from " << *contact << "'s presence";
|
retVal << "PresenceUser: " << *user << " successfully unsubscribed from " << *contact << "'s presence";
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue