1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-29 17:52:06 +01:00

New JStun and Media Fixes

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7919 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Thiago Camargo 2007-04-06 23:43:18 +00:00 committed by thiago
parent ca19a1ee57
commit 3d36536a41
4 changed files with 38 additions and 5 deletions

View file

@ -454,4 +454,18 @@ public class IncomingJingleSession extends JingleSession {
super.eventError(iq);
}
}
public IQ sendFormattedError(JingleError error){
IQ perror = null;
if (error != null) {
perror = createIQ(getSid(), getInitiator(), getResponder(), IQ.Type.ERROR);
// Fill in the fields with the info from the Jingle packet
perror.addExtension(error);
getConnection().sendPacket(perror);
System.err.println(perror.toXML());
}
return perror;
}
}

View file

@ -461,4 +461,18 @@ public class OutgoingJingleSession extends JingleSession {
super.eventError(iq);
}
}
public IQ sendFormattedError(JingleError error) {
IQ perror = null;
if (error != null) {
perror = createIQ(getSid(), getResponder(), getInitiator(), IQ.Type.ERROR);
// Fill in the fields with the info from the Jingle packet
perror.addExtension(error);
getConnection().sendPacket(perror);
System.err.println(perror.toXML());
}
return perror;
}
}

View file

@ -176,9 +176,14 @@ public class AudioChannel {
ds = javax.media.Manager.createDataSource(locator);
}
catch (Exception e) {
e.printStackTrace();
// Try JavaSound Locator as a last resort
try {
ds = javax.media.Manager.createDataSource(new MediaLocator("javasound://"));
}
catch (Exception ee) {
return "Couldn't create DataSource";
}
}
// Try to create a processor to handle the input jmf locator
try {