Removed user agent header from msi and updated travis build stuff

This commit is contained in:
mannol 2014-02-19 23:12:36 +01:00
parent fb757bcd49
commit efb070df9f
7 changed files with 19 additions and 56 deletions

View File

@ -13,42 +13,14 @@ before_script:
- make check -j3 > /dev/null
- sudo make install >/dev/null
- cd ..
#installing libconfig, needed for DHT_bootstrap_daemon
#- wget http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz > /dev/null
#- tar -xvzf libconfig-1.4.9.tar.gz > /dev/null
#- cd libconfig-1.4.9
#- ./configure > /dev/null
#- make -j3 > /dev/null
#- sudo make install > /dev/null
#- cd ..
#installing libopus, needed for audio encoding/decoding
- wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz > /dev/null
- tar xzvf opus-1.0.3.tar.gz > /dev/null
- tar xzf opus-1.0.3.tar.gz > /dev/null
- cd opus-1.0.3
- ./configure > /dev/null
- make -j3 > /dev/null
- sudo make install > /dev/null
- cd ..
#installing libsdl1.2, needed for displaying video frames
#- wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz > /dev/null
#- tar -xvzf SDL-1.2.15.tar.gz > /dev/null
#- cd SDL-1.2.15
#- ./configure > /dev/null
#- make -j3 /dev/null
#- sudo make install > /dev/null
#- cd ..
#installing libopenal, needed for audio capture/playback
#- sudo apt-get install libopenal-dev > /dev/null
#installing yasm, needed for compiling ffmpeg
- sudo apt-get install yasm > /dev/null
#installing ffmpeg, needed for capturing and encoding/decoding video
#- wget https://www.ffmpeg.org/releases/ffmpeg-2.0.2.tar.gz > /dev/null
#- tar -xvzf ffmpeg-2.0.2.tar.gz > /dev/null
#- cd ffmpeg-2.0.2
#- ./configure > /dev/null
#- make -j3 >/dev/null
#- sudo make install > /dev/null
#- cd ..
#installing vpx
- git clone http://git.chromium.org/webm/libvpx.git > /dev/null
- cd libvpx

View File

@ -89,7 +89,7 @@ Then clone this repo and generate makefile:
git clone git://github.com/irungentoo/ProjectTox-Core.git
cd ProjectTox-Core
autoreconf -i
./configure --with-dependency-search=`pwd`/../ffmpeg/install
./configure
make
sudo make install
```
@ -321,7 +321,11 @@ cd ..
You are now ready to compile with phone!
Note: Don't forget to run core configure like so:
```bash
./configure --with-dependency-search=`pwd`/../ffmpeg/install
```
before compiling the phone.
<a name="bootstrapd" />

View File

@ -84,7 +84,6 @@ GENERIC_HEADER ( Version )
GENERIC_HEADER ( Request )
GENERIC_HEADER ( Response )
GENERIC_HEADER ( CallType )
GENERIC_HEADER ( UserAgent )
GENERIC_HEADER ( CallId )
GENERIC_HEADER ( Info )
GENERIC_HEADER ( Reason )
@ -103,7 +102,6 @@ typedef struct _MSIMessage {
MSIHeaderRequest request;
MSIHeaderResponse response;
MSIHeaderCallType calltype;
MSIHeaderUserAgent useragent;
MSIHeaderInfo info;
MSIHeaderReason reason;
MSIHeaderCallId callid;
@ -128,7 +126,6 @@ static MSICallback callbacks[10] = {0};
#define INFO_FIELD "INFO"
#define REASON_FIELD "Reason"
#define CALLTYPE_FIELD "Call-type"
#define USERAGENT_FIELD "User-agent"
#define CALLID_FIELD "Call-id"
#define CRYPTOKEY_FIELD "Crypto-key"
#define NONCE_FIELD "Nonce"
@ -277,10 +274,9 @@ int parse_raw_data ( MSIMessage *msg, const uint8_t *data, uint16_t length )
}
break;
case 10: { /* User-agent, Crypto-key headers */
if ON_HEADER ( _it, msg->useragent, USERAGENT_FIELD, 10 )
else if ON_HEADER ( _it, msg->cryptokey, CRYPTOKEY_FIELD, 10 )
}
case 10: { /* Crypto-key headers */
if ON_HEADER ( _it, msg->cryptokey, CRYPTOKEY_FIELD, 10 )
}
break;
default:
@ -315,7 +311,6 @@ void free_message ( MSIMessage *msg )
free ( msg->calltype.header_value );
free ( msg->request.header_value );
free ( msg->response.header_value );
free ( msg->useragent.header_value );
free ( msg->version.header_value );
free ( msg->info.header_value );
free ( msg->cryptokey.header_value );
@ -484,7 +479,6 @@ uint16_t message_to_string ( MSIMessage *msg, uint8_t *dest )
CLEAN_ASSIGN ( _size, _iterated, REQUEST_FIELD, msg->request );
CLEAN_ASSIGN ( _size, _iterated, RESPONSE_FIELD, msg->response );
CLEAN_ASSIGN ( _size, _iterated, CALLTYPE_FIELD, msg->calltype );
CLEAN_ASSIGN ( _size, _iterated, USERAGENT_FIELD, msg->useragent );
CLEAN_ASSIGN ( _size, _iterated, INFO_FIELD, msg->info );
CLEAN_ASSIGN ( _size, _iterated, CALLID_FIELD, msg->callid );
CLEAN_ASSIGN ( _size, _iterated, REASON_FIELD, msg->reason );
@ -505,7 +499,6 @@ void msi_msg_set_##header ( MSIMessage* _msg, const uint8_t* header_value, uint1
ALLOCATE_HEADER( _msg->header, header_value, _size )}
GENERIC_SETTER_DEFINITION ( calltype )
GENERIC_SETTER_DEFINITION ( useragent )
GENERIC_SETTER_DEFINITION ( reason )
GENERIC_SETTER_DEFINITION ( info )
GENERIC_SETTER_DEFINITION ( callid )
@ -1191,14 +1184,13 @@ void msi_register_callback ( MSICallback callback, MSICallbackID id )
* @return MSISession* The created session.
* @retval NULL Error occured.
*/
MSISession *msi_init_session ( Messenger *messenger, const uint8_t *ua_name )
MSISession *msi_init_session ( Messenger* messenger )
{
assert ( messenger );
MSISession *_retu = calloc ( sizeof ( MSISession ), 1 );
assert ( _retu );
_retu->ua_name = ua_name;
_retu->messenger_handle = messenger;
_retu->agent_handler = NULL;

View File

@ -103,8 +103,6 @@ typedef struct _MSISession {
int last_error_id; /* Determine the last error */
const uint8_t *last_error_str;
const uint8_t *ua_name;
void *agent_handler; /* Pointer to an object that is handling msi */
Messenger *messenger_handle;
@ -152,11 +150,10 @@ void msi_register_callback(MSICallback callback, MSICallbackID id);
* @brief Start the control session.
*
* @param messenger Tox* object.
* @param user_agent User agent, i.e. 'Venom'; 'QT-gui'
* @return MSISession* The created session.
* @retval NULL Error occured.
*/
MSISession *msi_init_session ( Messenger *messenger, const uint8_t *ua_name );
MSISession *msi_init_session ( Messenger *messenger );
/**

View File

@ -1019,7 +1019,7 @@ av_session_t *av_init_session()
fraddr_to_str( _byte_address, _retu->_my_public_id );
_retu->av = toxav_new(_retu->_messenger, _retu, _USERAGENT, width, height);
_retu->av = toxav_new(_retu->_messenger, _retu, width, height);
/* ------------------ */

View File

@ -75,14 +75,13 @@ typedef struct _ToxAv {
* it will result in undefined behaviour.
*
* @param messenger The messenger handle.
* @param useragent The agent handling A/V session (i.e. phone).
* @param ua_name Useragent name.
* @param userdata The agent handling A/V session (i.e. phone).
* @param video_width Width of video frame.
* @param video_height Height of video frame.
* @return ToxAv*
* @retval NULL On error.
*/
ToxAv *toxav_new( Tox *messenger, void *useragent, const char *ua_name , uint16_t video_width, uint16_t video_height)
ToxAv *toxav_new( Tox *messenger, void *userdata, uint16_t video_width, uint16_t video_height)
{
ToxAv *av = calloc ( sizeof(ToxAv), 1);
@ -91,7 +90,7 @@ ToxAv *toxav_new( Tox *messenger, void *useragent, const char *ua_name , uint16_
av->messenger = (Messenger *)messenger;
av->msi_session = msi_init_session(av->messenger, (const unsigned char *) ua_name );
av->msi_session = msi_init_session(av->messenger);
av->msi_session->agent_handler = av;
av->rtp_sessions[0] = av->rtp_sessions [1] = NULL;
@ -102,7 +101,7 @@ ToxAv *toxav_new( Tox *messenger, void *useragent, const char *ua_name , uint16_
av->cs = codec_init_session(AUDIO_BITRATE, AUDIO_FRAME_DURATION, AUDIO_SAMPLE_RATE, AUDIO_CHANNELS, video_width,
video_height, VIDEO_BITRATE);
av->agent_handler = useragent;
av->agent_handler = userdata;
return av;
}

View File

@ -110,14 +110,13 @@ typedef enum {
* it will result in undefined behaviour.
*
* @param messenger The messenger handle.
* @param useragent The agent handling A/V session (i.e. phone).
* @param ua_name Useragent name.
* @param userdata The agent handling A/V session (i.e. phone).
* @param video_width Width of video frame.
* @param video_height Height of video frame.
* @return ToxAv*
* @retval NULL On error.
*/
ToxAv *toxav_new(Tox *messenger, void *useragent, const char *ua_name, uint16_t video_width, uint16_t video_height);
ToxAv *toxav_new(Tox* messenger, void* userdata, uint16_t video_width, uint16_t video_height);
/**
* @brief Remove A/V session.