diff options
author | irungentoo <irungentoo@tox.im> | 2014-02-19 17:43:42 -0500 |
---|---|---|
committer | irungentoo <irungentoo@tox.im> | 2014-02-19 17:43:42 -0500 |
commit | 0a73a6268921f97eb2ee3a2fb8febdcd2869b28e (patch) | |
tree | 30a202ba666964a1445f41d26e51792b56fcdbb1 /toxav/msi.c | |
parent | 098df5ae319d15672480fcd17cd4b98c2433e457 (diff) | |
parent | bc61d969e0f4c1d0652b1141b1cc8e51df970bd5 (diff) |
Merge pull request #749 from mannol1/master
Removed user agent header from msi and fixed travis build stuff
Diffstat (limited to 'toxav/msi.c')
-rw-r--r-- | toxav/msi.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/toxav/msi.c b/toxav/msi.c index 6cc9cf12..fda0dd3e 100644 --- a/toxav/msi.c +++ b/toxav/msi.c | |||
@@ -84,7 +84,6 @@ GENERIC_HEADER ( Version ) | |||
84 | GENERIC_HEADER ( Request ) | 84 | GENERIC_HEADER ( Request ) |
85 | GENERIC_HEADER ( Response ) | 85 | GENERIC_HEADER ( Response ) |
86 | GENERIC_HEADER ( CallType ) | 86 | GENERIC_HEADER ( CallType ) |
87 | GENERIC_HEADER ( UserAgent ) | ||
88 | GENERIC_HEADER ( CallId ) | 87 | GENERIC_HEADER ( CallId ) |
89 | GENERIC_HEADER ( Info ) | 88 | GENERIC_HEADER ( Info ) |
90 | GENERIC_HEADER ( Reason ) | 89 | GENERIC_HEADER ( Reason ) |
@@ -103,7 +102,6 @@ typedef struct _MSIMessage { | |||
103 | MSIHeaderRequest request; | 102 | MSIHeaderRequest request; |
104 | MSIHeaderResponse response; | 103 | MSIHeaderResponse response; |
105 | MSIHeaderCallType calltype; | 104 | MSIHeaderCallType calltype; |
106 | MSIHeaderUserAgent useragent; | ||
107 | MSIHeaderInfo info; | 105 | MSIHeaderInfo info; |
108 | MSIHeaderReason reason; | 106 | MSIHeaderReason reason; |
109 | MSIHeaderCallId callid; | 107 | MSIHeaderCallId callid; |
@@ -128,7 +126,6 @@ static MSICallback callbacks[10] = {0}; | |||
128 | #define INFO_FIELD "INFO" | 126 | #define INFO_FIELD "INFO" |
129 | #define REASON_FIELD "Reason" | 127 | #define REASON_FIELD "Reason" |
130 | #define CALLTYPE_FIELD "Call-type" | 128 | #define CALLTYPE_FIELD "Call-type" |
131 | #define USERAGENT_FIELD "User-agent" | ||
132 | #define CALLID_FIELD "Call-id" | 129 | #define CALLID_FIELD "Call-id" |
133 | #define CRYPTOKEY_FIELD "Crypto-key" | 130 | #define CRYPTOKEY_FIELD "Crypto-key" |
134 | #define NONCE_FIELD "Nonce" | 131 | #define NONCE_FIELD "Nonce" |
@@ -277,10 +274,9 @@ int parse_raw_data ( MSIMessage *msg, const uint8_t *data, uint16_t length ) | |||
277 | } | 274 | } |
278 | break; | 275 | break; |
279 | 276 | ||
280 | case 10: { /* User-agent, Crypto-key headers */ | 277 | case 10: { /* Crypto-key headers */ |
281 | if ON_HEADER ( _it, msg->useragent, USERAGENT_FIELD, 10 ) | 278 | if ON_HEADER ( _it, msg->cryptokey, CRYPTOKEY_FIELD, 10 ) |
282 | else if ON_HEADER ( _it, msg->cryptokey, CRYPTOKEY_FIELD, 10 ) | 279 | } |
283 | } | ||
284 | break; | 280 | break; |
285 | 281 | ||
286 | default: | 282 | default: |
@@ -315,7 +311,6 @@ void free_message ( MSIMessage *msg ) | |||
315 | free ( msg->calltype.header_value ); | 311 | free ( msg->calltype.header_value ); |
316 | free ( msg->request.header_value ); | 312 | free ( msg->request.header_value ); |
317 | free ( msg->response.header_value ); | 313 | free ( msg->response.header_value ); |
318 | free ( msg->useragent.header_value ); | ||
319 | free ( msg->version.header_value ); | 314 | free ( msg->version.header_value ); |
320 | free ( msg->info.header_value ); | 315 | free ( msg->info.header_value ); |
321 | free ( msg->cryptokey.header_value ); | 316 | free ( msg->cryptokey.header_value ); |
@@ -484,7 +479,6 @@ uint16_t message_to_string ( MSIMessage *msg, uint8_t *dest ) | |||
484 | CLEAN_ASSIGN ( _size, _iterated, REQUEST_FIELD, msg->request ); | 479 | CLEAN_ASSIGN ( _size, _iterated, REQUEST_FIELD, msg->request ); |
485 | CLEAN_ASSIGN ( _size, _iterated, RESPONSE_FIELD, msg->response ); | 480 | CLEAN_ASSIGN ( _size, _iterated, RESPONSE_FIELD, msg->response ); |
486 | CLEAN_ASSIGN ( _size, _iterated, CALLTYPE_FIELD, msg->calltype ); | 481 | CLEAN_ASSIGN ( _size, _iterated, CALLTYPE_FIELD, msg->calltype ); |
487 | CLEAN_ASSIGN ( _size, _iterated, USERAGENT_FIELD, msg->useragent ); | ||
488 | CLEAN_ASSIGN ( _size, _iterated, INFO_FIELD, msg->info ); | 482 | CLEAN_ASSIGN ( _size, _iterated, INFO_FIELD, msg->info ); |
489 | CLEAN_ASSIGN ( _size, _iterated, CALLID_FIELD, msg->callid ); | 483 | CLEAN_ASSIGN ( _size, _iterated, CALLID_FIELD, msg->callid ); |
490 | CLEAN_ASSIGN ( _size, _iterated, REASON_FIELD, msg->reason ); | 484 | 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 | |||
505 | ALLOCATE_HEADER( _msg->header, header_value, _size )} | 499 | ALLOCATE_HEADER( _msg->header, header_value, _size )} |
506 | 500 | ||
507 | GENERIC_SETTER_DEFINITION ( calltype ) | 501 | GENERIC_SETTER_DEFINITION ( calltype ) |
508 | GENERIC_SETTER_DEFINITION ( useragent ) | ||
509 | GENERIC_SETTER_DEFINITION ( reason ) | 502 | GENERIC_SETTER_DEFINITION ( reason ) |
510 | GENERIC_SETTER_DEFINITION ( info ) | 503 | GENERIC_SETTER_DEFINITION ( info ) |
511 | GENERIC_SETTER_DEFINITION ( callid ) | 504 | GENERIC_SETTER_DEFINITION ( callid ) |
@@ -1191,14 +1184,13 @@ void msi_register_callback ( MSICallback callback, MSICallbackID id ) | |||
1191 | * @return MSISession* The created session. | 1184 | * @return MSISession* The created session. |
1192 | * @retval NULL Error occured. | 1185 | * @retval NULL Error occured. |
1193 | */ | 1186 | */ |
1194 | MSISession *msi_init_session ( Messenger *messenger, const uint8_t *ua_name ) | 1187 | MSISession *msi_init_session ( Messenger* messenger ) |
1195 | { | 1188 | { |
1196 | assert ( messenger ); | 1189 | assert ( messenger ); |
1197 | 1190 | ||
1198 | MSISession *_retu = calloc ( sizeof ( MSISession ), 1 ); | 1191 | MSISession *_retu = calloc ( sizeof ( MSISession ), 1 ); |
1199 | assert ( _retu ); | 1192 | assert ( _retu ); |
1200 | 1193 | ||
1201 | _retu->ua_name = ua_name; | ||
1202 | _retu->messenger_handle = messenger; | 1194 | _retu->messenger_handle = messenger; |
1203 | _retu->agent_handler = NULL; | 1195 | _retu->agent_handler = NULL; |
1204 | 1196 | ||