Changeset 4:f97202eba572

Show
Ignore:
Timestamp:
05/23/06 19:40:31 (3 years ago)
Author:
emilie@TULEAR
Message:

update phapi-libutil-libwebcam

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • .hgignore

    r0 r4  
    88.tar.gz$ 
    99.tgz$ 
     10.vcproj$ 
     11.sln$ 
     12.suo$ 
     13.ncb$ 
     14.lib$ 
    1015debug/ 
    1116sconsign 
  • eXosip/include/eXosip/eXosip.h

    r0 r4  
    2828#include <osipparser2/osip_parser.h> 
    2929#include <osip2/osip_negotiation.h> 
     30#include <osip2/osip_dialog.h> 
    3031#include <osip2/osip.h> 
    3132 
     
    267268 
    268269 
     270void eXosip_sdp_negotiation_set_mediaip(osip_negotiation_t *sn); 
     271 
    269272 
    270273/** 
     
    492495int   eXosip_retrieve_negotiated_specific_payload(int jid, char *payload_name, int pnsize); 
    493496 
     497int eXosip_retrieve_sdp_negotiation_specific_result(osip_negotiation_ctx_t *ctx, char *payload_name,  int pnsize); 
     498 
    494499/** 
    495500 * Set a new application context for an existing call 
     
    575580 */ 
    576581int   eXosip_answer_refer(int jid, int status); 
     582 
     583 
     584struct eXosip_dialog_t; 
     585 
     586int _eXosip_answer_refer_123456(struct eXosip_call_t *jc, struct eXosip_dialog_t *jd, int code); 
    577587 
    578588/** @} */ 
     
    656666 * @param expires   Time between updates. 
    657667 */ 
    658 int  eXosip_subscribe_refresh(int sid, char *expires); 
     668int  eXosip_subscribe_refresh(int sid, const char *expires); 
    659669 
    660670/** 
  • eXosip/src/eXosip.c

    r0 r4  
    2626#include <eXosip/eXosip_cfg.h> 
    2727 
     28#include <osip2/osip.h> 
    2829#include <osip2/osip_mt.h> 
    2930#include <osip2/osip_condv.h> 
     
    846847  osip_message_t *message; 
    847848  osip_transaction_t *transaction; 
    848   jinfo_t *ji; 
    849   eXosip_msg_t *jm = 0; 
    850849 
    851850  int i; 
     
    911910{ 
    912911  osip_transaction_t *transaction; 
    913   osip_event_t *sipevent; 
    914912  osip_message_t *info; 
    915913  eXosip_dialog_t *jd = NULL; 
     
    955953   
    956954  osip_message_set_content_type(info, content_type); 
     955 
     956  if ( ! body ) { 
     957    OSIP_TRACE (osip_trace 
     958                (__FILE__, __LINE__, OSIP_ERROR, NULL, 
     959                 "eXosip: string body is NULL! ")); 
     960    return -2; 
     961  } 
    957962  osip_message_set_body(info, body, strlen(body)); 
    958963   
     
    22482253  eXosip_dialog_t *tjd = NULL; 
    22492254  eXosip_call_t *tjc = NULL; 
    2250   char *tx_cid_str, *tx_uri_str
     2255  char *tx_cid_str
    22512256  char *refer_to; 
    22522257  osip_uri_t *txuri; 
     
    27962801          /* modify the REGISTER request */ 
    27972802          { 
    2798             int osip_cseq_num = osip_atoi(reg->cseq->number); 
    2799             int length   = strlen(reg->cseq->number); 
    2800  
     2803            int osip_cseq_num = 0; 
     2804            int length = 0; 
    28012805 
    28022806            osip_authorization_t *aut; 
    28032807            osip_proxy_authorization_t *proxy_aut; 
    28042808             
     2809             
     2810            if ( ! reg->cseq->number ) { 
     2811              fprintf(stderr, "%s,%d: reg->cseq->number is NULL", __FILE__, __LINE__); 
     2812              return -1; 
     2813            } 
     2814 
     2815            osip_cseq_num = osip_atoi(reg->cseq->number); 
     2816            length   = strlen(reg->cseq->number); 
     2817 
     2818 
    28052819            aut = (osip_authorization_t *)osip_list_get(reg->authorizations, 0); 
    28062820            while (aut!=NULL) 
     
    29572971  /* modify the REGISTER request */ 
    29582972  { 
    2959     int length   = strlen(org_request->cseq->number); 
     2973    int length; 
     2974 
     2975    if ( ! org_request->cseq->number ) { 
     2976      fprintf(stderr, "%s,%d: org_request->cseq->number is NULL", __FILE__, __LINE__); 
     2977      return -1; 
     2978    } 
     2979 
     2980    length = strlen(org_request->cseq->number); 
    29602981    osip_cseq_num = osip_atoi(org_request->cseq->number); 
    29612982 
     
    30513072 
    30523073    osip_remove_transaction(eXosip.j_osip,tr); 
    3053     __osip_transaction_set_state(tr,MSG_IS_INVITE(org_request) ? ICT_TERMINATED : NICT_TERMINATED); 
     3074    osip_transaction_set_state(tr,MSG_IS_INVITE(org_request) ? ICT_TERMINATED : NICT_TERMINATED); 
    30543075    osip_transaction_set_your_instance(transaction, (void*) jinfo); 
    30553076 
     
    30723093  osip_message_t *publish; 
    30733094  osip_transaction_t *transaction; 
    3074   osip_event_t *sipevent; 
    30753095  int i; 
    30763096     
     
    31103130        struct addrinfo *addrinfo; 
    31113131        struct __eXosip_sockaddr addr; 
    3112         int i,len,oldTtl,n; 
     3132        int i,len,oldTtl; 
     3133        socklen_t n; 
    31133134 
    31143135        if (eXosip.j_stop_ua) return -1; 
     
    32163237} 
    32173238 
    3218 int eXosip_subscribe_refresh  (int sid, char *expires) 
     3239int eXosip_subscribe_refresh  (int sid, const char *expires) 
    32193240{ 
    32203241  int i; 
     
    34033424        osip_strncpy(subscription_state, "terminated;reason=noresource", 29); 
    34043425    } 
     3426 
     3427  if ( ! subscription_state ) { 
     3428    fprintf(stderr, "%s,%d: subscription_state is NULL", __FILE__, __LINE__); 
     3429    return -1; 
     3430  } 
     3431 
    34053432  tmp = subscription_state + strlen(subscription_state); 
     3433 
     3434 
    34063435  if (subscription_status!=EXOSIP_SUBCRSTATE_TERMINATED) 
    34073436    sprintf(tmp, "%i", 180); 
     
    35083537        osip_strncpy(subscription_state, "terminated;reason=noresource", 29); 
    35093538    } 
     3539 
     3540  if ( ! subscription_state ) { 
     3541    fprintf(stderr, "%s,%d: subscription_state is NULL", __FILE__, __LINE__); 
     3542    return -1; 
     3543  } 
     3544 
    35103545  tmp = subscription_state + strlen(subscription_state); 
    35113546  if (jn->n_ss_status!=EXOSIP_SUBCRSTATE_TERMINATED) 
  • eXosip/src/eXutils.c

    r0 r4  
    479479  int error; 
    480480  char portbuf[10]; 
     481 
    481482  if (service!=0) 
    482483    snprintf(portbuf, sizeof(portbuf), "%i", service); 
     484 
     485  if (!hostname) { 
     486      OSIP_TRACE (osip_trace 
     487                  (__FILE__, __LINE__, OSIP_INFO2, NULL, 
     488                   "hostname NULL.\n")); 
     489     return -1; 
     490  } 
    483491 
    484492  memset (&hints, 0, sizeof (hints)); 
  • eXosip/src/jcallback.c

    r0 r4  
    114114 */ 
    115115int  
    116 _send_udp(void *buf, int len, int flags, const struct sockaddr *to, int tolen) 
     116_send_udp(const void *buf, int len, int flags, const struct sockaddr *to, int tolen) 
    117117{ 
    118118        int res; 
     
    719719  if (MSG_IS_RESPONSE_FOR(sip, "OPTIONS")) 
    720720    { 
    721       eXosip_event_t *je; 
    722721      if (jc==NULL) 
    723722        { 
     
    856855{ 
    857856  osip_message_t *message; 
    858   int pos = 0; 
    859857 
    860858  if (transaction->ist_context!=NULL) 
     
    878876{ 
    879877  osip_message_t *message; 
    880   osip_body_t *body; 
    881   sdp_message_t *sdp; 
    882   int i; 
    883   int pos = 0; 
     878 
    884879  if (transaction->ict_context!=NULL) 
    885880    /* local sdp is in INVITE (or ACK!) */ 
     
    13411336  if (MSG_IS_RESPONSE_FOR(sip, "OPTIONS")) 
    13421337    { 
    1343       eXosip_event_t *je; 
     1338 
    13441339      if (jc==NULL) 
    13451340        { 
     
    14801475  if (MSG_IS_RESPONSE_FOR(sip, "OPTIONS")) 
    14811476    { 
    1482       eXosip_event_t *je; 
     1477 
    14831478      if (jc==NULL) 
    14841479        { 
     
    15491544  if (MSG_IS_RESPONSE_FOR(sip, "OPTIONS")) 
    15501545    { 
    1551       eXosip_event_t *je; 
     1546 
    15521547      if (jc==NULL) 
    15531548        { 
     
    17311726  if (MSG_IS_RESPONSE_FOR(sip, "OPTIONS")) 
    17321727    { 
    1733       eXosip_event_t *je; 
     1728 
    17341729      if (jc==NULL) 
    17351730        { 
  • eXosip/src/jdialog.c

    r0 r4  
    2323#endif 
    2424 
     25#include <time.h> 
     26 
    2527#include "eXosip2.h" 
    2628 
     
    175177  int i; 
    176178  eXosip_dialog_t *jd; 
    177   osip_contact_t  *ct; 
    178179 
    179180  *_jd = NULL; 
     
    229230{ 
    230231 
    231   printf("eXosip_dialog_free: id = %d jd=%08x\n", jd->d_id, jd);  
     232  printf("eXosip_dialog_free: id = %d jd=%08x\n", jd->d_id, (unsigned int)jd);  
    232233 
    233234  clean_transaction_list(jd->d_inc_trs); 
  • eXosip/src/jevents.c

    r0 r4  
    270270      if (i==0) 
    271271        { 
    272           int len = strlen(oldbody->body); 
    273  
    274272          if (je->msg_body) 
    275273            osip_free(je->msg_body); 
  • eXosip/src/jpipe.c

    r0 r4  
    1818*/ 
    1919 
     20#include "jpipe.h" 
     21 
     22#ifndef _WIN32 
     23 
    2024 
    2125#ifdef ENABLE_MPATROL 
     
    2327#endif 
    2428 
    25 #include "jpipe.h" 
    26  
    27 #ifndef WIN32 
     29#include <stdlib.h> 
     30#include <unistd.h> 
     31 
     32 
     33 
     34 
    2835 
    2936jpipe_t * jpipe () 
  • eXosip/src/jrequest.c

    r0 r4  
    117117#endif 
    118118  int doing_register; 
    119   char *register_callid_number = NULL; 
    120119 
    121120  i = osip_message_init(&request); 
     
    575574{ 
    576575  int i; 
    577   char *replaces; 
    578576 
    579577  if (to!=NULL && *to=='\0') 
  • eXosip/src/jresponse.c

    r0 r4  
    270270                  { 
    271271                  } 
    272                 else if (0==strcmp("110",payload)) 
     272                else if (0==strncmp("110",payload,3)) 
    273273                  { 
    274274                    sdp_message_a_attribute_add (local_sdp, 
     
    277277                                                 osip_strdup ("110 20")); 
    278278                  } 
    279                 else if (0==strcmp("111",payload)) 
     279                else if (0==strncmp("111",payload,3)) 
    280280                  { 
    281281                    sdp_message_a_attribute_add (local_sdp, 
     
    509509  i = sdp_message_to_str(sdp, &body); 
    510510  sdp_message_free(sdp); 
    511   if (i!=0) { 
     511  if ( ( i!=0 ) || ( ! body ) ) { 
    512512    osip_message_free(response); 
    513513    return -1; 
    514514  } 
     515   
    515516  i = osip_message_set_body(response, body, strlen(body)); 
    516517  if (i!=0) { 
     
    574575    } 
    575576 
    576   if (300<=code<=399) 
    577     { 
    578       /* Should add contact fields */ 
    579       /* ... */ 
    580     } 
     577/* eeeeeeekkk! should be OUT of wengophone! */ 
     578/*   if (300<=code<=399) */ 
     579/*     { */ 
     580/*       /\* Should add contact fields *\/ */ 
     581/*       /\* ... *\/ */ 
     582/*     } */ 
    581583 
    582584  osip_message_set_content_length(response, "0"); 
     
    593595 
    594596 
    595 int 
     597extern int 
    596598_eXosip_answer_refer_123456(eXosip_call_t *jc, eXosip_dialog_t *jd, int code) 
    597599{ 
     
    625627    } 
    626628 
    627   if (200<=code<=299
     629  if ( ( code >= 200 ) && ( code <= 299)
    628630    complete_answer_that_establish_a_dialog(response, tr->orig_request); 
    629631 
    630   if (300<=code<=399) 
    631     { 
    632       /* Should add contact fields */ 
    633       /* ... */ 
    634     } 
     632/* Yet another eeek */ 
     633/*   if (300<=code<=399) */ 
     634/*     { */ 
     635/*       /\* Should add contact fields *\/ */ 
     636/*       /\* ... *\/ */ 
     637/*     } */ 
    635638 
    636639  osip_message_set_content_length(response, "0"); 
     
    740743  /* request that estabish a dialog: */ 
    741744  /* 12.1.1 UAS Behavior */ 
    742   { 
    743745    i = complete_answer_that_establish_a_dialog(*answer, tr->orig_request); 
    744746    if (i!=0) goto g2atii_error_1;; /* ?? */ 
    745   } 
    746747 
    747748  return 0; 
     
    783784    } 
    784785 
    785   if (300<=code<=399) 
    786     { 
    787       /* Should add contact fields */ 
    788       /* ... */ 
    789     } 
     786/* just another eeek */ 
     787/*   if (300<=code<=399) */ 
     788/*     { */ 
     789/*       /\* Should add contact fields *\/ */ 
     790/*       /\* ... *\/ */ 
     791/*     } */ 
    790792 
    791793  osip_message_set_content_length(*answer, "0"); 
     
    923925    } 
    924926 
     927  if ( ! body ) { 
     928    fprintf(stderr, "%s,%d: body is NULL\n", __FILE__, __LINE__); 
     929    return -1; 
     930  } 
     931 
     932 
    925933  i = osip_message_set_body(response, body, strlen(body)); 
    926934  if (i!=0) { 
     
    937945  /* request that estabish a dialog: */ 
    938946  /* 12.1.1 UAS Behavior */ 
    939   { 
    940947    i = complete_answer_that_establish_a_dialog(response, tr->orig_request); 
    941     if (i!=0) goto g2atii_error_1;; /* ?? */ 
    942   } 
     948    if (i!=0) goto g2atii_error_1; /* ?? */ 
    943949  /* THIS RESPONSE MUST BE SENT RELIABILY until the final ACK is received !! */ 
    944950  /* this response must be stored at the upper layer!!! (it will be destroyed*/ 
     
    10531059      return 0; 
    10541060    } 
     1061 
     1062  if ( ! body ) { 
     1063    fprintf(stderr, "%s,%d: body is NULL\n", __FILE__, __LINE__); 
     1064    return -1; 
     1065  } 
    10551066 
    10561067  i = osip_message_set_body(response, body, strlen(body)); 
     
    11441155    } 
    11451156 
    1146   if (300<=code<=399 && (contact != 0)
     1157  if ( ( code >= 300 ) && ( code <= 399 ) && ( contact != 0 )
    11471158    { 
    11481159      osip_message_clean_contacts(response); 
     
    13141325    } 
    13151326 
    1316   if (300<=code<=399) 
    1317     { 
    1318       /* Should add contact fields */ 
    1319       /* ... */ 
    1320     } 
     1327/*   if (300<=code<=399) */ 
     1328/*     { */ 
     1329/*       /\* Should add contact fields *\/ */ 
     1330/*       /\* ... *\/ */ 
     1331/*     } */ 
    13211332 
    13221333  evt_answer = osip_new_outgoing_sipmessage(response); 
  • eXosip/src/misc.c

    r0 r4  
    5555eXosip_remove_transaction_from_call(osip_transaction_t *tr, eXosip_call_t *jc) 
    5656{ 
    57   osip_transaction_t *inc_tr; 
    58   osip_transaction_t *out_tr; 
    5957  eXosip_dialog_t *jd; 
    60   int pos=0; 
    6158 
    6259  if (!tr) 
  • eXosip/src/sdp_offans.c

    r0 r4  
    210210 
    211211 
    212 void eXosip_sdp_negotiation_set_mediaip(osip_negotiation_t *sn) 
     212extern void  
     213eXosip_sdp_negotiation_set_mediaip(osip_negotiation_t *sn) 
    213214{ 
    214215  osip_free(sn->o_addr); 
     
    386387 
    387388 
    388 int eXosip_retrieve_sdp_negotiation_specific_result(osip_negotiation_ctx_t *ctx, char *payload_name,  int pnsize) 
     389extern int  
     390eXosip_retrieve_sdp_negotiation_specific_result(osip_negotiation_ctx_t *ctx, char *payload_name,  int pnsize) 
    389391{ 
    390392  sdp_message_t *local_sdp = 0; 
  • eXosip/src/udp.c

    r0 r4  
    2020#include <stdlib.h> 
    2121#include <errno.h> 
     22#include <time.h> 
    2223 
    2324#ifdef ENABLE_MPATROL 
     
    399400  ctype = osip_message_get_content_type(evt->sip); 
    400401 
    401   if (0 && ctype==NULL || ctype->type==NULL || ctype->subtype==NULL) 
    402     { 
     402  if ( ( ctype == NULL ) || ( ctype->type == NULL ) || ( ctype->subtype == NULL) ) { 
    403403      send_default_answer(jd, transaction, evt, 400, "Missing Header", "Missing Content-Type Header", __LINE__); 
    404404      return ;       
    405     } 
    406  
    407   if (0 && !ctype_is(ctype, "message", "sipfrag") && !ctype_is(ctype, "application", "sip"))  
    408     { 
     405  } 
     406 
     407  if ( ! ( ctype_is(ctype, "message", "sipfrag") ) && ! ( ctype_is(ctype, "application", "sip") ) ) { 
    409408      send_default_answer(jd, transaction, evt, 501, "Unsupported body type", "Unsupported body type", __LINE__); 
    410409      return ; 
    411    
     410 
    412411 
    413412  osip_message_get_body(evt->sip, 0, &body); 
    414   if (0 && body==NULL || body->body==NULL) 
    415     { 
     413  if ( ( body == NULL ) || ( body->body == NULL ) ) { 
    416414      send_default_answer(jd, transaction, evt, 400, "Missing Body", "Missing Body", __LINE__); 
    417415      return ; 
    418    
     416 
    419417 
    420418   
    421419  { 
    422420    eXosip_event_t *je; 
    423     int len; 
     421 
    424422    je = eXosip_event_init_for_call(EXOSIP_CALL_REFER_STATUS, jc, jd); 
    425423    if (je==NULL) return; 
     
    20302028              return ; 
    20312029                        } else { 
    2032                                 __osip_transaction_set_state(old_trn, NIST_TERMINATED); 
     2030                                osip_transaction_set_state(old_trn, NIST_TERMINATED); 
    20332031                                osip_list_remove_element(jd->d_inc_trs, old_trn); 
    20342032                                osip_list_add_nodup(eXosip.j_transactions, old_trn, 0); 
     
    22842282 
    22852283 
    2286                   i = osip_find_transaction_and_add_event(eXosip.j_osip, sipevent); 
    2287                   if (i!=0
     2284                  transaction = osip_find_transaction_and_add_event(eXosip.j_osip, sipevent); 
     2285                  if (transaction == NULL
    22882286                    { 
    22892287                      /* this event has no transaction, */ 
  • httptunnel/httptunnel.c

    r0 r4  
    4444        #define SOCKET int 
    4545 
     46#endif 
     47 
     48#ifndef MSG_NOSIGNAL 
     49        #define MSG_NOSIGNAL 0 
    4650#endif 
    4751 
     
    461465        { 
    462466 
     467                int i = 1; 
    463468                sock = socket(PF_INET, SOCK_STREAM, 0); 
    464469                if (sock == -1) 
     
    468473                  } 
    469474 
     475#ifdef SO_NOSIGPIPE 
     476                setsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, &i, sizeof(i)); 
     477#endif 
     478 
    470479                hs->fd = sock; 
    471480                addr.sin_port = (unsigned short) htons(httpServerPort); 
     
    511520                else 
    512521#endif 
    513                         nbytes = send(hs->fd, query, (int) strlen(query), 0); 
     522                        nbytes = send(hs->fd, query, (int) strlen(query), MSG_NOSIGNAL); 
    514523 
    515524                if (nbytes < 0) 
     
    623632                        else 
    624633#endif 
    625                                 send_bytes = send(hs->fd, (char *) ptr2, size2send, 0); 
     634                                send_bytes = send(hs->fd, (char *) ptr2, size2send, MSG_NOSIGNAL); 
    626635 
    627636                        if (send_bytes < 0) 
  • libosip2/include/osip2/osip.h

    r0 r4  
    782782 
    783783 
     784int osip_transaction_set_state  (osip_transaction_t * transaction, state_t state); 
     785 
     786 
    784787#ifndef DOXYGEN 
    785788/** 
     
    806809 * @param evt The element representing the SIP MESSAGE. 
    807810 */ 
    808   int osip_find_transaction_and_add_event (osip_t * osip, osip_event_t * evt); 
     811  osip_transaction_t *osip_find_transaction_and_add_event (osip_t * osip, osip_event_t * evt); 
    809812 
    810813/** 
  • libosip2/include/osip2/osip_dialog.h

    r0 r4  
    220220 
    221221 
     222  int osip_dialog_build_replaces_value(osip_dialog_t * dialog, char **str); 
     223 
     224 
     225 
    222226#ifdef __cplusplus 
    223227} 
  • libosip2/src/osip2/ict.c

    r0 r4  
    1717  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    1818*/ 
     19 
     20#include <stdlib.h> 
    1921 
    2022#include <osip2/internal.h> 
  • libosip2/src/osip2/ict_fsm.c

    r0 r4  
    1717  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    1818*/ 
     19 
     20#include <stdlib.h> 
    1921 
    2022#include <osip2/internal.h> 
  • libosip2/src/osip2/ist.c

    r0 r4  
    1717  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    1818*/ 
     19 
     20#include <stdlib.h> 
    1921 
    2022#include <osip2/internal.h> 
  • libosip2/src/osip2/ist_fsm.c

    r0 r4  
    1717  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    1818*/ 
     19 
     20#include <stdlib.h> 
    1921 
    2022#include <osip2/internal.h> 
  • libosip2/src/osip2/nict.c

    r0 r4  
    1717  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    1818*/ 
     19 
     20#include <stdlib.h> 
    1921 
    2022#include <osip2/internal.h> 
  • libosip2/src/osip2/nict_fsm.c

    r0 r4  
    1818*/ 
    1919 
     20#include <stdlib.h> 
     21 
    2022#include <osip2/internal.h> 
    2123#include <osip2/osip.h> 
  • libosip2/src/osip2/nist.c

    r0 r4  
    1717  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    1818*/ 
     19 
     20#include <stdlib.h> 
    1921 
    2022#include <osip2/internal.h> 
  • libosip2/src/osip2/nist_fsm.c

    r0 r4  
    1717  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    1818*/ 
     19 
     20#include <stdlib.h> 
    1921 
    2022#include <osip2/internal.h> 
  • libosip2/src/osip2/osip.c

    r0 r4  
    1717  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    1818*/ 
     19 
     20#include <stdlib.h> 
    1921 
    2022#include <osip2/internal.h> 
     
    743745#endif 
    744746 
    745 int 
     747osip_transaction_t * 
    746748osip_find_transaction_and_add_event (osip_t * osip, osip_event_t * evt) 
    747749{ 
    748750  osip_transaction_t *transaction = __osip_find_transaction (osip, evt, 1); 
    749751 
    750   if (transaction == NULL) 
    751     return -1; 
    752   return 0; 
     752  return transaction; 
    753753} 
    754754 
  • libosip2/src/osip2/osip_dialog.c

    r0 r4  
    1818*/ 
    1919 
     20#include <stdlib.h> 
     21 
    2022#include <osip2/internal.h> 
    2123#include <osip2/osip.h> 
     
    309311{ 
    310312   
    311   const char * from = osip_replaces_get_from_tag(rep)
    312   const char * to  = osip_replaces_get_to_tag(rep)
     313  const char * from
     314  const char * to
    313315  char *callid; 
    314316  int i; 
     317 
     318  from = (const char *) osip_replaces_get_from_tag((osip_replaces_t *)rep); 
     319  to   = (const char *) osip_replaces_get_to_tag((osip_replaces_t *)rep); 
    315320 
    316321  if (-1 == osip_call_id_to_str(rep->call_id, &callid)) 
     
    329334#endif 
    330335 
    331 int osip_dialog_build_replaces_value(osip_dialog_t * dialog, char **str) 
     336extern int  
     337osip_dialog_build_replaces_value(osip_dialog_t * dialog, char **str) 
    332338{ 
    333339  char *to, *from; 
  • libosip2/src/osip2/osip_event.c